You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by re...@apache.org on 2006/02/21 16:46:40 UTC
svn commit: r379499 [2/5] - in /tomcat/jasper/tc6.0.x/src: etc/ etc/dtd/
share/javax/servlet/ share/javax/servlet/jsp/ share/javax/servlet/jsp/el/
share/javax/servlet/jsp/tagext/ share/javax/servlet/jsp/tagext/doc-files/
share/org/apache/jasper/runtime/
Added: tomcat/jasper/tc6.0.x/src/etc/dtd/web-jsptaglibrary_2_0.xsd
URL: http://svn.apache.org/viewcvs/tomcat/jasper/tc6.0.x/src/etc/dtd/web-jsptaglibrary_2_0.xsd?rev=379499&view=auto
==============================================================================
--- tomcat/jasper/tc6.0.x/src/etc/dtd/web-jsptaglibrary_2_0.xsd (added)
+++ tomcat/jasper/tc6.0.x/src/etc/dtd/web-jsptaglibrary_2_0.xsd Tue Feb 21 07:46:36 2006
@@ -0,0 +1,1025 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright 2004 The Apache Software Foundation
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<xsd:schema
+ targetNamespace="http://java.sun.com/xml/ns/j2ee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ elementFormDefault="qualified"
+ attributeFormDefault="unqualified"
+ version="2.0">
+
+ <xsd:annotation>
+ <xsd:documentation>
+ %W% %G%
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Copyright 2003 Sun Microsystems, Inc., 901 San Antonio
+ Road, Palo Alto, California 94303, U.S.A. All rights
+ reserved.
+
+ Sun Microsystems, Inc. has intellectual property rights
+ relating to technology described in this document. In
+ particular, and without limitation, these intellectual
+ property rights may include one or more of the U.S. patents
+ listed at http://www.sun.com/patents and one or more
+ additional patents or pending patent applications in the
+ U.S. and other countries.
+
+ This document and the technology which it describes are
+ distributed under licenses restricting their use, copying,
+ distribution, and decompilation. No part of this document
+ may be reproduced in any form by any means without prior
+ written authorization of Sun and its licensors, if any.
+
+ Third-party software, including font technology, is
+ copyrighted and licensed from Sun suppliers.
+
+ Sun, Sun Microsystems, the Sun logo, Solaris, Java, J2EE,
+ JavaServer Pages, Enterprise JavaBeans and the Java Coffee
+ Cup logo are trademarks or registered trademarks of Sun
+ Microsystems, Inc. in the U.S. and other countries.
+
+ Federal Acquisitions: Commercial Software - Government Users
+ Subject to Standard License Terms and Conditions.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+
+ This is the XML Schema for the JSP Taglibrary
+ descriptor. All Taglibrary descriptors must
+ indicate the tag library schema by using the Taglibrary
+ namespace:
+
+ http://java.sun.com/xml/ns/j2ee
+
+ and by indicating the version of the schema by
+ using the version element as shown below:
+
+ <taglib xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="..."
+ version="2.0">
+ ...
+ </taglib>
+
+ The instance documents may indicate the published
+ version of the schema using xsi:schemaLocation attribute
+ for J2EE namespace with the following location:
+
+ http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd
+
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:include schemaLocation="j2ee_1_4.xsd"/>
+
+
+<!-- **************************************************** -->
+
+
+ <xsd:element name="taglib" type="j2ee:tldTaglibType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The taglib tag is the document root.
+ The definition of taglib is provided
+ by the tldTaglibType.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:unique name="tag-name-uniqueness">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The taglib element contains, among other things, tag and
+ tag-file elements.
+ The name subelements of these elements must each be unique.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:selector xpath="j2ee:tag|j2ee:tag-file"/>
+ <xsd:field xpath="j2ee:name"/>
+ </xsd:unique>
+
+ <xsd:unique name="function-name-uniqueness">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The taglib element contains function elements.
+ The name subelements of these elements must each be unique.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:selector xpath="j2ee:function"/>
+ <xsd:field xpath="j2ee:name"/>
+ </xsd:unique>
+
+ </xsd:element>
+
+
+<!-- **************************************************** -->
+
+ <xsd:complexType name="body-contentType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Specifies the type of body that is valid for a tag.
+ This value is used by the JSP container to validate
+ that a tag invocation has the correct body syntax and
+ by page composition tools to assist the page author
+ in providing a valid tag body.
+
+ There are currently four values specified:
+
+ tagdependent The body of the tag is interpreted by the tag
+ implementation itself, and is most likely
+ in a different "language", e.g embedded SQL
+ statements.
+
+ JSP The body of the tag contains nested JSP
+ syntax.
+
+ empty The body must be empty
+
+ scriptless The body accepts only template text, EL
+ Expressions, and JSP action elements. No
+ scripting elements are allowed.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:simpleContent>
+ <xsd:restriction base="j2ee:string">
+ <xsd:enumeration value="tagdependent"/>
+ <xsd:enumeration value="JSP"/>
+ <xsd:enumeration value="empty"/>
+ <xsd:enumeration value="scriptless"/>
+ </xsd:restriction>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+<!-- **************************************************** -->
+
+ <xsd:complexType name="extensibleType" abstract="true">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The extensibleType is an abstract base type that is used to
+ define the type of extension-elements. Instance documents
+ must substitute a known type to define the extension by
+ using xsi:type attribute to define the actual type of
+ extension-elements.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+<!-- **************************************************** -->
+
+ <xsd:complexType name="functionType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The function element is used to provide information on each
+ function in the tag library that is to be exposed to the EL.
+
+ The function element may have several subelements defining:
+
+ description Optional tag-specific information
+
+ display-name A short name that is intended to be
+ displayed by tools
+
+ icon Optional icon element that can be used
+ by tools
+
+ name A unique name for this function
+
+ function-class Provides the name of the Java class that
+ implements the function
+
+ function-signature Provides the signature, as in the Java
+ Language Specification, of the Java
+ method that is to be used to implement
+ the function.
+
+ example Optional informal description of an
+ example of a use of this function
+
+ function-extension Zero or more extensions that provide extra
+ information about this function, for tool
+ consumption
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:group ref="j2ee:descriptionGroup"/>
+ <xsd:element name="name"
+ type="j2ee:tld-canonical-nameType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ A unique name for this function.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="function-class"
+ type="j2ee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Provides the fully-qualified class name of the Java
+ class containing the static method that implements
+ the function.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ </xsd:element>
+ <xsd:element name="function-signature"
+ type="j2ee:string">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Provides the signature, of the static Java method that is
+ to be used to implement the function. The syntax of the
+ function-signature element is as follows:
+
+ FunctionSignature ::= ReturnType S MethodName S?
+ '(' S? Parameters? S? ')'
+
+ ReturnType ::= Type
+
+ MethodName ::= Identifier
+
+ Parameters ::= Parameter
+ | ( Parameter S? ',' S? Parameters )
+
+ Parameter ::= Type
+
+ Where:
+
+ * Type is a basic type or a fully qualified
+ Java class name (including package name),
+ as per the 'Type' production in the Java
+ Language Specification, Second Edition,
+ Chapter 18.
+
+ * Identifier is a Java identifier, as per
+ the 'Identifier' production in the Java
+ Language Specification, Second
+ Edition, Chapter 18.
+
+ Example:
+
+ java.lang.String nickName( java.lang.String, int )
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ </xsd:element>
+ <xsd:element name="example"
+ type="j2ee:xsdStringType"
+ minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The example element contains an informal description
+ of an example of the use of this function.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ </xsd:element>
+ <xsd:element name="function-extension"
+ type="j2ee:tld-extensionType"
+ minOccurs="0"
+ maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Function extensions are for tool use only and must not affect
+ the behavior of a container.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+<!-- **************************************************** -->
+
+ <xsd:complexType name="tagFileType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Defines an action in this tag library that is implemented
+ as a .tag file.
+
+ The tag-file element has two required subelements:
+
+ description Optional tag-specific information
+
+ display-name A short name that is intended to be
+ displayed by tools
+
+ icon Optional icon element that can be used
+ by tools
+
+ name The unique action name
+
+ path Where to find the .tag file implementing this
+ action, relative to the root of the web
+ application or the root of the JAR file for a
+ tag library packaged in a JAR. This must
+ begin with /WEB-INF/tags if the .tag file
+ resides in the WAR, or /META-INF/tags if the
+ .tag file resides in a JAR.
+
+ example Optional informal description of an
+ example of a use of this tag
+
+ tag-extension Zero or more extensions that provide extra
+ information about this tag, for tool
+ consumption
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:group ref="j2ee:descriptionGroup"/>
+ <xsd:element name="name"
+ type="j2ee:tld-canonical-nameType"/>
+ <xsd:element name="path"
+ type="j2ee:pathType"/>
+ <xsd:element name="example"
+ type="j2ee:xsdStringType"
+ minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The example element contains an informal description
+ of an example of the use of a tag.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ </xsd:element>
+ <xsd:element name="tag-extension"
+ type="j2ee:tld-extensionType"
+ minOccurs="0"
+ maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Tag extensions are for tool use only and must not affect
+ the behavior of a container.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+<!-- **************************************************** -->
+
+ <xsd:complexType name="tagType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The tag defines a unique tag in this tag library. It has one
+ attribute, id.
+
+ The tag element may have several subelements defining:
+
+ description Optional tag-specific information
+
+ display-name A short name that is intended to be
+ displayed by tools
+
+ icon Optional icon element that can be used
+ by tools
+
+ name The unique action name
+
+ tag-class The tag handler class implementing
+ javax.servlet.jsp.tagext.JspTag
+
+ tei-class An optional subclass of
+ javax.servlet.jsp.tagext.TagExtraInfo
+
+ body-content The body content type
+
+ variable Optional scripting variable information
+
+ attribute All attributes of this action that are
+ evaluated prior to invocation.
+
+ dynamic-attributes Whether this tag supports additional
+ attributes with dynamic names. If
+ true, the tag-class must implement the
+ javax.servlet.jsp.tagext.DynamicAttributes
+ interface. Defaults to false.
+
+ example Optional informal description of an
+ example of a use of this tag
+
+ tag-extension Zero or more extensions that provide extra
+ information about this tag, for tool
+ consumption
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:group ref="j2ee:descriptionGroup"/>
+ <xsd:element name="name"
+ type="j2ee:tld-canonical-nameType"/>
+ <xsd:element name="tag-class"
+ type="j2ee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Defines the subclass of javax.serlvet.jsp.tagext.JspTag
+ that implements the request time semantics for
+ this tag. (required)
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ </xsd:element>
+ <xsd:element name="tei-class"
+ type="j2ee:fully-qualified-classType"
+ minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Defines the subclass of javax.servlet.jsp.tagext.TagExtraInfo
+ for this tag. (optional)
+
+ If this is not given, the class is not consulted at
+ translation time.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="body-content"
+ type="j2ee:body-contentType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Specifies the format for the body of this tag.
+ The default in JSP 1.2 was "JSP" but because this
+ is an invalid setting for simple tag handlers, there
+ is no longer a default in JSP 2.0. A reasonable
+ default for simple tag handlers is "scriptless" if
+ the tag can have a body.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="variable"
+ type="j2ee:variableType"
+ minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="attribute"
+ type="j2ee:tld-attributeType"
+ minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="dynamic-attributes"
+ type="j2ee:generic-booleanType"
+ minOccurs="0"/>
+ <xsd:element name="example"
+ type="j2ee:xsdStringType"
+ minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The example element contains an informal description
+ of an example of the use of a tag.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ </xsd:element>
+ <xsd:element name="tag-extension"
+ type="j2ee:tld-extensionType"
+ minOccurs="0"
+ maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Tag extensions are for tool use only and must not affect
+ the behavior of a container.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+<!-- **************************************************** -->
+
+ <xsd:complexType name="tld-attributeType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The attribute element defines an attribute for the nesting
+ tag. The attributre element may have several subelements
+ defining:
+
+ description a description of the attribute
+
+ name the name of the attribute
+
+ required whether the attribute is required or
+ optional
+
+ rtexprvalue whether the attribute is a runtime attribute
+
+ type the type of the attributes
+
+ fragment whether this attribute is a fragment
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="description"
+ type="j2ee:descriptionType"
+ minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="name"
+ type="j2ee:java-identifierType"/>
+ <xsd:element name="required"
+ type="j2ee:generic-booleanType"
+ minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Defines if the nesting attribute is required or
+ optional.
+
+ If not present then the default is "false", i.e
+ the attribute is optional.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+
+ <xsd:choice>
+ <xsd:sequence>
+ <xsd:element name="rtexprvalue"
+ type="j2ee:generic-booleanType"
+ minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Defines if the nesting attribute can have scriptlet
+ expressions as a value, i.e the value of the
+ attribute may be dynamically calculated at request
+ time, as opposed to a static value determined at
+ translation time.
+
+ If not present then the default is "false", i.e the
+ attribute has a static value
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ </xsd:element>
+ <xsd:element name="type"
+ type="j2ee:fully-qualified-classType"
+ minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Defines the Java type of the attributes value. For
+ static values (those determined at translation time)
+ the type is always java.lang.String.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:element name="fragment"
+ type="j2ee:generic-booleanType"
+ minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ "true" if this attribute is of type
+ javax.jsp.tagext.JspFragment, representing dynamic
+ content that can be re-evaluated as many times
+ as needed by the tag handler. If omitted or "false",
+ the default is still type="java.lang.String"
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+<!-- **************************************************** -->
+
+ <xsd:complexType name="tld-canonical-nameType">
+
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Defines the canonical name of a tag or attribute being
+ defined.
+
+ The name must conform to the lexical rules for an NMTOKEN.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:simpleContent>
+ <xsd:restriction base="j2ee:xsdNMTOKENType"/>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+<!-- **************************************************** -->
+
+ <xsd:complexType name="tld-extensionType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The tld-extensionType is used to indicate
+ extensions to a specific TLD element.
+
+ It is used by elements to designate an extension block
+ that is targeted to a specific extension designated by
+ a set of extension elements that are declared by a
+ namespace. The namespace identifies the extension to
+ the tool that processes the extension.
+
+ The type of the extension-element is abstract. Therefore,
+ a concrete type must be specified by the TLD using
+ xsi:type attribute for each extension-element.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:element name="extension-element"
+ type="j2ee:extensibleType"
+ maxOccurs="unbounded"/>
+ </xsd:sequence>
+
+ <xsd:attribute name="namespace"
+ use="required"
+ type="xsd:anyURI"/>
+ <xsd:attribute name="id" type="xsd:ID"/>
+
+ </xsd:complexType>
+
+<!-- **************************************************** -->
+
+ <xsd:complexType name="tldTaglibType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The taglib tag is the document root, it defines:
+
+ description a simple string describing the "use" of this
+ taglib, should be user discernable
+
+ display-name the display-name element contains a
+ short name that is intended to be displayed
+ by tools
+
+ icon optional icon that can be used by tools
+
+ tlib-version the version of the tag library implementation
+
+ short-name a simple default short name that could be
+ used by a JSP authoring tool to create
+ names with a mnemonic value; for example,
+ the it may be used as the prefered prefix
+ value in taglib directives
+
+ uri a uri uniquely identifying this taglib
+
+ validator optional TagLibraryValidator information
+
+ listener optional event listener specification
+
+ tag tags in this tag library
+
+ tag-file tag files in this tag library
+
+ function zero or more EL functions defined in this
+ tag library
+
+ taglib-extension zero or more extensions that provide extra
+ information about this taglib, for tool
+ consumption
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:group ref="j2ee:descriptionGroup"/>
+ <xsd:element name="tlib-version"
+ type="j2ee:dewey-versionType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Describes this version (number) of the taglibrary.
+ It is described as a dewey decimal.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ </xsd:element>
+
+ <xsd:element name="short-name"
+ type="j2ee:tld-canonical-nameType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Defines a simple default name that could be used by
+ a JSP authoring tool to create names with a
+ mnemonicvalue; for example, it may be used as the
+ preferred prefix value in taglib directives. Do
+ not use white space, and do not start with digits
+ or underscore.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ </xsd:element>
+ <xsd:element name="uri"
+ type="j2ee:xsdAnyURIType"
+ minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Defines a public URI that uniquely identifies this
+ version of the taglibrary. Leave it empty if it
+ does not apply.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ </xsd:element>
+ <xsd:element name="validator"
+ type="j2ee:validatorType"
+ minOccurs="0">
+ </xsd:element>
+ <xsd:element name="listener"
+ type="j2ee:listenerType"
+ minOccurs="0" maxOccurs="unbounded">
+ </xsd:element>
+ <xsd:element name="tag"
+ type="j2ee:tagType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ <xsd:element name="tag-file"
+ type="j2ee:tagFileType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ <xsd:element name="function"
+ type="j2ee:functionType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ <xsd:element name="taglib-extension"
+ type="j2ee:tld-extensionType"
+ minOccurs="0"
+ maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Taglib extensions are for tool use only and must not affect
+ the behavior of a container.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="version"
+ type="j2ee:dewey-versionType"
+ fixed="2.0"
+ use="required">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Describes the JSP version (number) this taglibrary
+ requires in order to function (dewey decimal)
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ </xsd:attribute>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+<!-- **************************************************** -->
+
+ <xsd:complexType name="validatorType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ A validator that can be used to validate
+ the conformance of a JSP page to using this tag library is
+ defined by a validatorType.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:element name="description"
+ type="j2ee:descriptionType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ <xsd:element name="validator-class"
+ type="j2ee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Defines the TagLibraryValidator class that can be used
+ to validate the conformance of a JSP page to using this
+ tag library.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="init-param"
+ type="j2ee:param-valueType"
+ minOccurs="0" maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The init-param element contains a name/value pair as an
+ initialization param.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ </xsd:element>
+
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+<!-- **************************************************** -->
+
+ <xsd:complexType name="variable-scopeType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ This type defines scope of the scripting variable. See
+ TagExtraInfo for details. The allowed values are,
+ "NESTED", "AT_BEGIN" and "AT_END".
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:simpleContent>
+ <xsd:restriction base="j2ee:string">
+ <xsd:enumeration value="NESTED"/>
+ <xsd:enumeration value="AT_BEGIN"/>
+ <xsd:enumeration value="AT_END"/>
+ </xsd:restriction>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+<!-- **************************************************** -->
+
+ <xsd:complexType name="variableType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The variableType provides information on the scripting
+ variables defined by using this tag. It is a (translation
+ time) error for a tag that has one or more variable
+ subelements to have a TagExtraInfo class that returns a
+ non-null value from a call to getVariableInfo().
+
+ The subelements of variableType are of the form:
+
+ description Optional description of this
+ variable
+
+ name-given The variable name as a constant
+
+ name-from-attribute The name of an attribute whose
+ (translation time) value will
+ give the name of the
+ variable. One of name-given or
+ name-from-attribute is required.
+
+ variable-class Name of the class of the variable.
+ java.lang.String is default.
+
+ declare Whether the variable is declared
+ or not. True is the default.
+
+ scope The scope of the scripting varaible
+ defined. NESTED is default.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:element name="description"
+ type="j2ee:descriptionType"
+ minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:choice>
+ <xsd:element name="name-given"
+ type="j2ee:java-identifierType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The name for the scripting variable.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+
+ <xsd:element name="name-from-attribute"
+ type="j2ee:java-identifierType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The name of an attribute whose
+ (translation-time) value will give the name of
+ the variable.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:choice>
+ <xsd:element name="variable-class"
+ type="j2ee:fully-qualified-classType"
+ minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The optional name of the class for the scripting
+ variable. The default is java.lang.String.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ </xsd:element>
+
+ <xsd:element name="declare"
+ type="j2ee:generic-booleanType"
+ minOccurs="0">
+
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Whether the scripting variable is to be defined
+ or not. See TagExtraInfo for details. This
+ element is optional and "true" is the default.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="scope"
+ type="j2ee:variable-scopeType"
+ minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The element is optional and "NESTED" is the default.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+</xsd:schema>
+
Added: tomcat/jasper/tc6.0.x/src/share/javax/servlet/jsp/ErrorData.java
URL: http://svn.apache.org/viewcvs/tomcat/jasper/tc6.0.x/src/share/javax/servlet/jsp/ErrorData.java?rev=379499&view=auto
==============================================================================
--- tomcat/jasper/tc6.0.x/src/share/javax/servlet/jsp/ErrorData.java (added)
+++ tomcat/jasper/tc6.0.x/src/share/javax/servlet/jsp/ErrorData.java Tue Feb 21 07:46:36 2006
@@ -0,0 +1,88 @@
+/*
+* Copyright 2004 The Apache Software Foundation
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package javax.servlet.jsp;
+
+/**
+ * Contains information about an error, for error pages.
+ * The information contained in this instance is meaningless if not used
+ * in the context of an error page. To indicate a JSP is an error page,
+ * the page author must set the isErrorPage attribute of the page directive
+ * to "true".
+ *
+ * @see PageContext#getErrorData
+ * @since 2.0
+ */
+
+public final class ErrorData {
+
+ private Throwable throwable;
+ private int statusCode;
+ private String uri;
+ private String servletName;
+
+ /**
+ * Creates a new ErrorData object.
+ *
+ * @param throwable The Throwable that is the cause of the error
+ * @param statusCode The status code of the error
+ * @param uri The request URI
+ * @param servletName The name of the servlet invoked
+ */
+ public ErrorData( Throwable throwable, int statusCode, String uri,
+ String servletName )
+ {
+ this.throwable = throwable;
+ this.statusCode = statusCode;
+ this.uri = uri;
+ this.servletName = servletName;
+ }
+
+ /**
+ * Returns the Throwable that caused the error.
+ *
+ * @return The Throwable that caused the error
+ */
+ public Throwable getThrowable() {
+ return this.throwable;
+ }
+
+ /**
+ * Returns the status code of the error.
+ *
+ * @return The status code of the error
+ */
+ public int getStatusCode() {
+ return this.statusCode;
+ }
+
+ /**
+ * Returns the request URI.
+ *
+ * @return The request URI
+ */
+ public String getRequestURI() {
+ return this.uri;
+ }
+
+ /**
+ * Returns the name of the servlet invoked.
+ *
+ * @return The name of the servlet invoked
+ */
+ public String getServletName() {
+ return this.servletName;
+ }
+}
Added: tomcat/jasper/tc6.0.x/src/share/javax/servlet/jsp/HttpJspPage.java
URL: http://svn.apache.org/viewcvs/tomcat/jasper/tc6.0.x/src/share/javax/servlet/jsp/HttpJspPage.java?rev=379499&view=auto
==============================================================================
--- tomcat/jasper/tc6.0.x/src/share/javax/servlet/jsp/HttpJspPage.java (added)
+++ tomcat/jasper/tc6.0.x/src/share/javax/servlet/jsp/HttpJspPage.java Tue Feb 21 07:46:36 2006
@@ -0,0 +1,57 @@
+/*
+* Copyright 2004 The Apache Software Foundation
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+package javax.servlet.jsp;
+
+import javax.servlet.*;
+import javax.servlet.http.*;
+import java.io.IOException;
+
+/**
+ * The HttpJspPage interface describes the interaction that a JSP Page
+ * Implementation Class must satisfy when using the HTTP protocol.
+ *
+ * <p>
+ * The behaviour is identical to that of the JspPage, except for the signature
+ * of the _jspService method, which is now expressible in the Java type
+ * system and included explicitly in the interface.
+ *
+ * @see JspPage
+ */
+
+public interface HttpJspPage extends JspPage {
+
+ /** The _jspService()method corresponds to the body of the JSP page. This
+ * method is defined automatically by the JSP container and should never
+ * be defined by the JSP page author.
+ * <p>
+ * If a superclass is specified using the extends attribute, that
+ * superclass may choose to perform some actions in its service() method
+ * before or after calling the _jspService() method. See using the extends
+ * attribute in the JSP_Engine chapter of the JSP specification.
+ *
+ * @param request Provides client request information to the JSP.
+ * @param response Assists the JSP in sending a response to the client.
+ * @throws ServletException Thrown if an error occurred during the
+ * processing of the JSP and that the container should take
+ * appropriate action to clean up the request.
+ * @throws IOException Thrown if an error occurred while writing the
+ * response for this page.
+ */
+ public void _jspService(HttpServletRequest request,
+ HttpServletResponse response)
+ throws ServletException, IOException;
+}
Added: tomcat/jasper/tc6.0.x/src/share/javax/servlet/jsp/JspApplicationContext.java
URL: http://svn.apache.org/viewcvs/tomcat/jasper/tc6.0.x/src/share/javax/servlet/jsp/JspApplicationContext.java?rev=379499&view=auto
==============================================================================
--- tomcat/jasper/tc6.0.x/src/share/javax/servlet/jsp/JspApplicationContext.java (added)
+++ tomcat/jasper/tc6.0.x/src/share/javax/servlet/jsp/JspApplicationContext.java Tue Feb 21 07:46:36 2006
@@ -0,0 +1,76 @@
+/*
+* Copyright 2004 The Apache Software Foundation
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package javax.servlet.jsp;
+
+import javax.el.ELContextListener;
+import javax.el.ELResolver;
+import javax.el.ExpressionFactory;
+
+/**
+ * <p>
+ * Stores <i>application</i>-scoped information for the JSP container.
+ * </p>
+ * @since 2.1
+ */
+public interface JspApplicationContext {
+
+ /**
+ * <p>
+ * Registers an <code>ELContextListener</code> that will notified whenever
+ * a new <code>ELContext</code> is created.
+ * </p>
+ * <p>
+ * At the very least, any <code>ELContext</code> instantiated will have reference
+ * to the <code>JspContext</code> under <code>JspContext.class</code>.
+ * </p>
+ *
+ * @param listener
+ */
+ public void addELContextListener(ELContextListener listener);
+
+ /**
+ * <p>
+ * Adds an <code>ELResolver</code> to the chain of EL variable and property management
+ * within JSP pages and Tag files.
+ * </p>
+ * <p>
+ * JSP has a default set of ELResolvers to chain for all EL evaluation:
+ * <ul>
+ * <li><code>ImplicitObjectELResolver</code></li>
+ * <li><code>ELResolver</code> instances registered with this method</li>
+ * <li><code>MapELResolver</code></li>
+ * <li><code>ListELResolver</code></li>
+ * <li><code>ArrayELResolver</code></li>
+ * <li><code>BeanELResolver</code></li>
+ * <li><code>ScopedAttributeELResolver</code></li>
+ * </ul>
+ * </p>
+ *
+ * @param resolver an additional resolver
+ * @throws IllegalStateException if called after the application's <code>ServletContextListeners</code> have been initialized.
+ */
+ public void addELResolver(ELResolver resolver) throws IllegalStateException;
+
+ /**
+ * <p>
+ * Returns the JSP container's <code>ExpressionFactory</code> implementation for EL use.
+ * </p>
+ *
+ * @return an <code>ExpressionFactory</code> implementation
+ */
+ public ExpressionFactory getExpressionFactory();
+
+}
Added: tomcat/jasper/tc6.0.x/src/share/javax/servlet/jsp/JspContext.java
URL: http://svn.apache.org/viewcvs/tomcat/jasper/tc6.0.x/src/share/javax/servlet/jsp/JspContext.java?rev=379499&view=auto
==============================================================================
--- tomcat/jasper/tc6.0.x/src/share/javax/servlet/jsp/JspContext.java (added)
+++ tomcat/jasper/tc6.0.x/src/share/javax/servlet/jsp/JspContext.java Tue Feb 21 07:46:36 2006
@@ -0,0 +1,274 @@
+/*
+* Copyright 2004 The Apache Software Foundation
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package javax.servlet.jsp;
+
+import java.util.Enumeration;
+
+import javax.el.ELContext;
+import javax.servlet.jsp.el.ExpressionEvaluator;
+import javax.servlet.jsp.el.VariableResolver;
+
+/**
+ * <p>
+ * <code>JspContext</code> serves as the base class for the
+ * PageContext class and abstracts all information that is not specific
+ * to servlets. This allows for Simple Tag Extensions to be used
+ * outside of the context of a request/response Servlet.
+ * <p>
+ * The JspContext provides a number of facilities to the
+ * page/component author and page implementor, including:
+ * <ul>
+ * <li>a single API to manage the various scoped namespaces
+ * <li>a mechanism to obtain the JspWriter for output
+ * <li>a mechanism to expose page directive attributes to the
+ * scripting environment
+ * </ul>
+ *
+ * <p><B>Methods Intended for Container Generated Code</B>
+ * <p>
+ * The following methods enable the <B>management of nested</B> JspWriter
+ * streams to implement Tag Extensions: <code>pushBody()</code> and
+ * <code>popBody()</code>
+ *
+ * <p><B>Methods Intended for JSP authors</B>
+ * <p>
+ * Some methods provide <B>uniform access</B> to the diverse objects
+ * representing scopes.
+ * The implementation must use the underlying machinery
+ * corresponding to that scope, so information can be passed back and
+ * forth between the underlying environment (e.g. Servlets) and JSP pages.
+ * The methods are:
+ * <code>setAttribute()</code>, <code>getAttribute()</code>,
+ * <code>findAttribute()</code>, <code>removeAttribute()</code>,
+ * <code>getAttributesScope()</code> and
+ * <code>getAttributeNamesInScope()</code>.
+ *
+ * <p>
+ * The following methods provide <B>convenient access</B> to implicit objects:
+ * <code>getOut()</code>
+ *
+ * <p>
+ * The following methods provide <B>programmatic access</b> to the
+ * Expression Language evaluator:
+ * <code>getExpressionEvaluator()</code>, <code>getVariableResolver()</code>
+ *
+ * @since 2.0
+ */
+
+public abstract class JspContext {
+
+ /**
+ * Sole constructor. (For invocation by subclass constructors,
+ * typically implicit.)
+ */
+ public JspContext() {
+ }
+
+ /**
+ * Register the name and value specified with page scope semantics.
+ * If the value passed in is <code>null</code>, this has the same
+ * effect as calling
+ * <code>removeAttribute( name, PageContext.PAGE_SCOPE )</code>.
+ *
+ * @param name the name of the attribute to set
+ * @param value the value to associate with the name, or null if the
+ * attribute is to be removed from the page scope.
+ * @throws NullPointerException if the name is null
+ */
+
+ abstract public void setAttribute(String name, Object value);
+
+ /**
+ * Register the name and value specified with appropriate
+ * scope semantics. If the value passed in is <code>null</code>,
+ * this has the same effect as calling
+ * <code>removeAttribute( name, scope )</code>.
+ *
+ * @param name the name of the attribute to set
+ * @param value the object to associate with the name, or null if
+ * the attribute is to be removed from the specified scope.
+ * @param scope the scope with which to associate the name/object
+ *
+ * @throws NullPointerException if the name is null
+ * @throws IllegalArgumentException if the scope is invalid
+ * @throws IllegalStateException if the scope is
+ * PageContext.SESSION_SCOPE but the page that was requested
+ * does not participate in a session or the session has been
+ * invalidated.
+ */
+
+ abstract public void setAttribute(String name, Object value, int scope);
+
+ /**
+ * Returns the object associated with the name in the page scope or null
+ * if not found.
+ *
+ * @param name the name of the attribute to get
+ * @return the object associated with the name in the page scope
+ * or null if not found.
+ *
+ * @throws NullPointerException if the name is null
+ */
+
+ abstract public Object getAttribute(String name);
+
+ /**
+ * Return the object associated with the name in the specified
+ * scope or null if not found.
+ *
+ * @param name the name of the attribute to set
+ * @param scope the scope with which to associate the name/object
+ * @return the object associated with the name in the specified
+ * scope or null if not found.
+ *
+ * @throws NullPointerException if the name is null
+ * @throws IllegalArgumentException if the scope is invalid
+ * @throws IllegalStateException if the scope is
+ * PageContext.SESSION_SCOPE but the page that was requested
+ * does not participate in a session or the session has been
+ * invalidated.
+ */
+
+ abstract public Object getAttribute(String name, int scope);
+
+ /**
+ * Searches for the named attribute in page, request, session (if valid),
+ * and application scope(s) in order and returns the value associated or
+ * null.
+ *
+ * @param name the name of the attribute to search for
+ * @return the value associated or null
+ * @throws NullPointerException if the name is null
+ */
+
+ abstract public Object findAttribute(String name);
+
+ /**
+ * Remove the object reference associated with the given name
+ * from all scopes. Does nothing if there is no such object.
+ *
+ * @param name The name of the object to remove.
+ * @throws NullPointerException if the name is null
+ */
+
+ abstract public void removeAttribute(String name);
+
+ /**
+ * Remove the object reference associated with the specified name
+ * in the given scope. Does nothing if there is no such object.
+ *
+ * @param name The name of the object to remove.
+ * @param scope The scope where to look.
+ * @throws IllegalArgumentException if the scope is invalid
+ * @throws IllegalStateException if the scope is
+ * PageContext.SESSION_SCOPE but the page that was requested
+ * does not participate in a session or the session has been
+ * invalidated.
+ * @throws NullPointerException if the name is null
+ */
+
+ abstract public void removeAttribute(String name, int scope);
+
+ /**
+ * Get the scope where a given attribute is defined.
+ *
+ * @param name the name of the attribute to return the scope for
+ * @return the scope of the object associated with the name specified or 0
+ * @throws NullPointerException if the name is null
+ */
+
+ abstract public int getAttributesScope(String name);
+
+ /**
+ * Enumerate all the attributes in a given scope.
+ *
+ * @param scope the scope to enumerate all the attributes for
+ * @return an enumeration of names (java.lang.String) of all the
+ * attributes the specified scope
+ * @throws IllegalArgumentException if the scope is invalid
+ * @throws IllegalStateException if the scope is
+ * PageContext.SESSION_SCOPE but the page that was requested
+ * does not participate in a session or the session has been
+ * invalidated.
+ */
+
+ abstract public Enumeration getAttributeNamesInScope(int scope);
+
+ /**
+ * The current value of the out object (a JspWriter).
+ *
+ * @return the current JspWriter stream being used for client response
+ */
+ abstract public JspWriter getOut();
+
+ /**
+ * Provides programmatic access to the ExpressionEvaluator.
+ * The JSP Container must return a valid instance of an
+ * ExpressionEvaluator that can parse EL expressions.
+ *
+ * @return A valid instance of an ExpressionEvaluator.
+ * @since 2.0
+ */
+ public abstract ExpressionEvaluator getExpressionEvaluator();
+
+
+ public abstract ELContext getELContext();
+
+ /**
+ * Returns an instance of a VariableResolver that provides access to the
+ * implicit objects specified in the JSP specification using this JspContext
+ * as the context object.
+ *
+ * @return A valid instance of a VariableResolver.
+ * @since 2.0
+ */
+ public abstract VariableResolver getVariableResolver();
+
+ /**
+ * Return a new JspWriter object that sends output to the
+ * provided Writer. Saves the current "out" JspWriter,
+ * and updates the value of the "out" attribute in the
+ * page scope attribute namespace of the JspContext.
+ * <p>The returned JspWriter must implement all methods and
+ * behave as though it were unbuffered. More specifically:
+ * <ul>
+ * <li>clear() must throw an IOException</li>
+ * <li>clearBuffer() does nothing</li>
+ * <li>getBufferSize() always returns 0</li>
+ * <li>getRemaining() always returns 0</li>
+ * </ul>
+ * </p>
+ *
+ * @param writer The Writer for the returned JspWriter to send
+ * output to.
+ * @return a new JspWriter that writes to the given Writer.
+ * @since 2.0
+ */
+ public JspWriter pushBody( java.io.Writer writer ) {
+ return null; // XXX to implement
+ }
+
+ /**
+ * Return the previous JspWriter "out" saved by the matching
+ * pushBody(), and update the value of the "out" attribute in
+ * the page scope attribute namespace of the JspContext.
+ *
+ * @return the saved JspWriter.
+ */
+ public JspWriter popBody() {
+ return null; // XXX to implement
+ }
+}
Added: tomcat/jasper/tc6.0.x/src/share/javax/servlet/jsp/JspEngineInfo.java
URL: http://svn.apache.org/viewcvs/tomcat/jasper/tc6.0.x/src/share/javax/servlet/jsp/JspEngineInfo.java?rev=379499&view=auto
==============================================================================
--- tomcat/jasper/tc6.0.x/src/share/javax/servlet/jsp/JspEngineInfo.java (added)
+++ tomcat/jasper/tc6.0.x/src/share/javax/servlet/jsp/JspEngineInfo.java Tue Feb 21 07:46:36 2006
@@ -0,0 +1,47 @@
+/*
+* Copyright 2004 The Apache Software Foundation
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package javax.servlet.jsp;
+
+/**
+ * The JspEngineInfo is an abstract class that provides information on the
+ * current JSP engine.
+ */
+
+public abstract class JspEngineInfo {
+
+ /**
+ * Sole constructor. (For invocation by subclass constructors,
+ * typically implicit.)
+ */
+ public JspEngineInfo() {
+ }
+
+ /**
+ * Return the version number of the JSP specification that is supported by
+ * this JSP engine.
+ * <p>
+ * Specification version numbers that consists of positive decimal integers
+ * separated by periods ".", for example, "2.0" or "1.2.3.4.5.6.7".
+ * This allows an extensible number to be used to
+ * represent major, minor, micro, etc versions.
+ * The version number must begin with a number.
+ * </p>
+ *
+ * @return the specification version, null is returned if it is not known
+ */
+
+ public abstract String getSpecificationVersion();
+}
Added: tomcat/jasper/tc6.0.x/src/share/javax/servlet/jsp/JspException.java
URL: http://svn.apache.org/viewcvs/tomcat/jasper/tc6.0.x/src/share/javax/servlet/jsp/JspException.java?rev=379499&view=auto
==============================================================================
--- tomcat/jasper/tc6.0.x/src/share/javax/servlet/jsp/JspException.java (added)
+++ tomcat/jasper/tc6.0.x/src/share/javax/servlet/jsp/JspException.java Tue Feb 21 07:46:36 2006
@@ -0,0 +1,112 @@
+/*
+* Copyright 2004 The Apache Software Foundation
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package javax.servlet.jsp;
+
+/**
+ * A generic exception known to the JSP engine; uncaught
+ * JspExceptions will result in an invocation of the errorpage
+ * machinery.
+ */
+
+public class JspException extends Exception {
+
+ private Throwable rootCause;
+
+
+ /**
+ * Construct a JspException.
+ */
+ public JspException() {
+ }
+
+
+ /**
+ * Constructs a new JSP exception with the
+ * specified message. The message can be written
+ * to the server log and/or displayed for the user.
+ *
+ * @param msg a <code>String</code>
+ * specifying the text of
+ * the exception message
+ *
+ */
+ public JspException(String msg) {
+ super(msg);
+ }
+
+
+ /**
+ * Constructs a new JSP exception when the JSP
+ * needs to throw an exception and include a message
+ * about the "root cause" exception that interfered with its
+ * normal operation, including a description message.
+ *
+ *
+ * @param message a <code>String</code> containing
+ * the text of the exception message
+ *
+ * @param rootCause the <code>Throwable</code> exception
+ * that interfered with the servlet's
+ * normal operation, making this servlet
+ * exception necessary
+ *
+ */
+
+ public JspException(String message, Throwable rootCause) {
+ super(message);
+ this.rootCause = rootCause;
+ }
+
+
+ /**
+ * Constructs a new JSP exception when the JSP
+ * needs to throw an exception and include a message
+ * about the "root cause" exception that interfered with its
+ * normal operation. The exception's message is based on the localized
+ * message of the underlying exception.
+ *
+ * <p>This method calls the <code>getLocalizedMessage</code> method
+ * on the <code>Throwable</code> exception to get a localized exception
+ * message. When subclassing <code>JspException</code>,
+ * this method can be overridden to create an exception message
+ * designed for a specific locale.
+ *
+ * @param rootCause the <code>Throwable</code> exception
+ * that interfered with the JSP's
+ * normal operation, making the JSP exception
+ * necessary
+ *
+ */
+
+ public JspException(Throwable rootCause) {
+ super(rootCause.getLocalizedMessage());
+ this.rootCause = rootCause;
+ }
+
+
+ /**
+ * Returns the exception that caused this JSP exception.
+ *
+ *
+ * @return the <code>Throwable</code>
+ * that caused this JSP exception
+ *
+ */
+
+ public Throwable getRootCause() {
+ return rootCause;
+ }
+}
Added: tomcat/jasper/tc6.0.x/src/share/javax/servlet/jsp/JspFactory.java
URL: http://svn.apache.org/viewcvs/tomcat/jasper/tc6.0.x/src/share/javax/servlet/jsp/JspFactory.java?rev=379499&view=auto
==============================================================================
--- tomcat/jasper/tc6.0.x/src/share/javax/servlet/jsp/JspFactory.java (added)
+++ tomcat/jasper/tc6.0.x/src/share/javax/servlet/jsp/JspFactory.java Tue Feb 21 07:46:36 2006
@@ -0,0 +1,155 @@
+/*
+* Copyright 2004 The Apache Software Foundation
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package javax.servlet.jsp;
+
+import javax.servlet.Servlet;
+import javax.servlet.ServletContext;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.jsp.PageContext;
+
+/**
+ * <p>
+ * The JspFactory is an abstract class that defines a number of factory
+ * methods available to a JSP page at runtime for the purposes of creating
+ * instances of various interfaces and classes used to support the JSP
+ * implementation.
+ * <p>
+ * A conformant JSP Engine implementation will, during it's initialization
+ * instantiate an implementation dependent subclass of this class, and make
+ * it globally available for use by JSP implementation classes by registering
+ * the instance created with this class via the
+ * static <code> setDefaultFactory() </code> method.
+ * <p>
+ * The PageContext and the JspEngineInfo classes are the only implementation-dependent
+ * classes that can be created from the factory.
+ * <p>
+ * JspFactory objects should not be used by JSP page authors.
+ */
+
+public abstract class JspFactory {
+
+ private static JspFactory deflt = null;
+
+ /**
+ * Sole constructor. (For invocation by subclass constructors,
+ * typically implicit.)
+ */
+ public JspFactory() {
+ }
+
+ /**
+ * <p>
+ * set the default factory for this implementation. It is illegal for
+ * any principal other than the JSP Engine runtime to call this method.
+ * </p>
+ *
+ * @param deflt The default factory implementation
+ */
+
+ public static synchronized void setDefaultFactory(JspFactory deflt) {
+ JspFactory.deflt = deflt;
+ }
+
+ /**
+ * Returns the default factory for this implementation.
+ *
+ * @return the default factory for this implementation
+ */
+
+ public static synchronized JspFactory getDefaultFactory() {
+ return deflt;
+ }
+
+ /**
+ * <p>
+ * obtains an instance of an implementation dependent
+ * javax.servlet.jsp.PageContext abstract class for the calling Servlet
+ * and currently pending request and response.
+ * </p>
+ *
+ * <p>
+ * This method is typically called early in the processing of the
+ * _jspService() method of a JSP implementation class in order to
+ * obtain a PageContext object for the request being processed.
+ * </p>
+ * <p>
+ * Invoking this method shall result in the PageContext.initialize()
+ * method being invoked. The PageContext returned is properly initialized.
+ * </p>
+ * <p>
+ * All PageContext objects obtained via this method shall be released
+ * by invoking releasePageContext().
+ * </p>
+ *
+ * @param servlet the requesting servlet
+ * @param request the current request pending on the servlet
+ * @param response the current response pending on the servlet
+ * @param errorPageURL the URL of the error page for the requesting JSP, or null
+ * @param needsSession true if the JSP participates in a session
+ * @param buffer size of buffer in bytes, PageContext.NO_BUFFER if no buffer,
+ * PageContext.DEFAULT_BUFFER if implementation default.
+ * @param autoflush should the buffer autoflush to the output stream on buffer
+ * overflow, or throw an IOException?
+ *
+ * @return the page context
+ *
+ * @see javax.servlet.jsp.PageContext
+ */
+
+ public abstract PageContext getPageContext(Servlet servlet,
+ ServletRequest request,
+ ServletResponse response,
+ String errorPageURL,
+ boolean needsSession,
+ int buffer,
+ boolean autoflush);
+
+ /**
+ * <p>
+ * called to release a previously allocated PageContext object.
+ * Results in PageContext.release() being invoked.
+ * This method should be invoked prior to returning from the _jspService() method of a JSP implementation
+ * class.
+ * </p>
+ *
+ * @param pc A PageContext previously obtained by getPageContext()
+ */
+
+ public abstract void releasePageContext(PageContext pc);
+
+ /**
+ * <p>
+ * called to get implementation-specific information on the current JSP engine.
+ * </p>
+ *
+ * @return a JspEngineInfo object describing the current JSP engine
+ */
+
+ public abstract JspEngineInfo getEngineInfo();
+
+ /**
+ * <p>
+ * Obtain the <code>JspApplicationContext</code> instance that was associated
+ * within the passed <code>ServletContext</code> for this web application.
+ * </p>
+ *
+ * @param context the current web application's <code>ServletContext</code>
+ * @return <code>JspApplicationContext</code> instance
+ * @since 2.1
+ */
+ public abstract JspApplicationContext getJspApplicationContext(ServletContext context);
+}
Added: tomcat/jasper/tc6.0.x/src/share/javax/servlet/jsp/JspPage.java
URL: http://svn.apache.org/viewcvs/tomcat/jasper/tc6.0.x/src/share/javax/servlet/jsp/JspPage.java?rev=379499&view=auto
==============================================================================
--- tomcat/jasper/tc6.0.x/src/share/javax/servlet/jsp/JspPage.java (added)
+++ tomcat/jasper/tc6.0.x/src/share/javax/servlet/jsp/JspPage.java Tue Feb 21 07:46:36 2006
@@ -0,0 +1,89 @@
+/*
+* Copyright 2004 The Apache Software Foundation
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package javax.servlet.jsp;
+
+import javax.servlet.*;
+
+/**
+ * The JspPage interface describes the generic interaction that a JSP Page
+ * Implementation class must satisfy; pages that use the HTTP protocol
+ * are described by the HttpJspPage interface.
+ *
+ * <p><B>Two plus One Methods</B>
+ * <p>
+ * The interface defines a protocol with 3 methods; only two of
+ * them: jspInit() and jspDestroy() are part of this interface as
+ * the signature of the third method: _jspService() depends on
+ * the specific protocol used and cannot be expressed in a generic
+ * way in Java.
+ * <p>
+ * A class implementing this interface is responsible for invoking
+ * the above methods at the appropriate time based on the
+ * corresponding Servlet-based method invocations.
+ * <p>
+ * The jspInit() and jspDestroy() methods can be defined by a JSP
+ * author, but the _jspService() method is defined automatically
+ * by the JSP processor based on the contents of the JSP page.
+ *
+ * <p><B>_jspService()</B>
+ * <p>
+ * The _jspService()method corresponds to the body of the JSP page. This
+ * method is defined automatically by the JSP container and should never
+ * be defined by the JSP page author.
+ * <p>
+ * If a superclass is specified using the extends attribute, that
+ * superclass may choose to perform some actions in its service() method
+ * before or after calling the _jspService() method. See using the extends
+ * attribute in the JSP_Engine chapter of the JSP specification.
+ * <p>
+ * The specific signature depends on the protocol supported by the JSP page.
+ *
+ * <pre>
+ * public void _jspService(<em>ServletRequestSubtype</em> request,
+ * <em>ServletResponseSubtype</em> response)
+ * throws ServletException, IOException;
+ * </pre>
+ */
+
+
+public interface JspPage extends Servlet {
+
+ /**
+ * The jspInit() method is invoked when the JSP page is initialized. It
+ * is the responsibility of the JSP implementation (and of the class
+ * mentioned by the extends attribute, if present) that at this point
+ * invocations to the getServletConfig() method will return the desired
+ * value.
+ *
+ * A JSP page can override this method by including a definition for it
+ * in a declaration element.
+ *
+ * A JSP page should redefine the init() method from Servlet.
+ */
+ public void jspInit();
+
+ /**
+ * The jspDestroy() method is invoked when the JSP page is about to be
+ * destroyed.
+ *
+ * A JSP page can override this method by including a definition for it
+ * in a declaration element.
+ *
+ * A JSP page should redefine the destroy() method from Servlet.
+ */
+ public void jspDestroy();
+
+}
Added: tomcat/jasper/tc6.0.x/src/share/javax/servlet/jsp/JspTagException.java
URL: http://svn.apache.org/viewcvs/tomcat/jasper/tc6.0.x/src/share/javax/servlet/jsp/JspTagException.java?rev=379499&view=auto
==============================================================================
--- tomcat/jasper/tc6.0.x/src/share/javax/servlet/jsp/JspTagException.java (added)
+++ tomcat/jasper/tc6.0.x/src/share/javax/servlet/jsp/JspTagException.java Tue Feb 21 07:46:36 2006
@@ -0,0 +1,92 @@
+/*
+* Copyright 2004 The Apache Software Foundation
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package javax.servlet.jsp;
+
+/**
+ * Exception to be used by a Tag Handler to indicate some unrecoverable
+ * error.
+ * This error is to be caught by the top level of the JSP page and will result
+ * in an error page.
+ */
+
+public class JspTagException extends JspException {
+ /**
+ * Constructs a new JspTagException with the specified message.
+ * The message can be written to the server log and/or displayed
+ * for the user.
+ *
+ * @param msg a <code>String</code> specifying the text of
+ * the exception message
+ */
+ public JspTagException(String msg) {
+ super( msg );
+ }
+
+ /**
+ * Constructs a new JspTagException with no message.
+ */
+ public JspTagException() {
+ super();
+ }
+
+ /**
+ * Constructs a new JspTagException when the JSP Tag
+ * needs to throw an exception and include a message
+ * about the "root cause" exception that interfered with its
+ * normal operation, including a description message.
+ *
+ *
+ * @param message a <code>String</code> containing
+ * the text of the exception message
+ *
+ * @param rootCause the <code>Throwable</code> exception
+ * that interfered with the JSP Tag's
+ * normal operation, making this JSP Tag
+ * exception necessary
+ *
+ * @since 2.0
+ */
+ public JspTagException(String message, Throwable rootCause) {
+ super( message, rootCause );
+ }
+
+
+ /**
+ * Constructs a new JSP Tag exception when the JSP Tag
+ * needs to throw an exception and include a message
+ * about the "root cause" exception that interfered with its
+ * normal operation. The exception's message is based on the localized
+ * message of the underlying exception.
+ *
+ * <p>This method calls the <code>getLocalizedMessage</code> method
+ * on the <code>Throwable</code> exception to get a localized exception
+ * message. When subclassing <code>JspTagException</code>,
+ * this method can be overridden to create an exception message
+ * designed for a specific locale.
+ *
+ * @param rootCause the <code>Throwable</code> exception
+ * that interfered with the JSP Tag's
+ * normal operation, making the JSP Tag
+ * exception necessary
+ *
+ * @since 2.0
+ */
+
+ public JspTagException(Throwable rootCause) {
+ super( rootCause );
+ }
+
+}
Added: tomcat/jasper/tc6.0.x/src/share/javax/servlet/jsp/JspWriter.java
URL: http://svn.apache.org/viewcvs/tomcat/jasper/tc6.0.x/src/share/javax/servlet/jsp/JspWriter.java?rev=379499&view=auto
==============================================================================
--- tomcat/jasper/tc6.0.x/src/share/javax/servlet/jsp/JspWriter.java (added)
+++ tomcat/jasper/tc6.0.x/src/share/javax/servlet/jsp/JspWriter.java Tue Feb 21 07:46:36 2006
@@ -0,0 +1,442 @@
+/*
+* Copyright 2004 The Apache Software Foundation
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+package javax.servlet.jsp;
+
+import java.io.IOException;
+
+/**
+ * <p>
+ * The actions and template data in a JSP page is written using the
+ * JspWriter object that is referenced by the implicit variable out which
+ * is initialized automatically using methods in the PageContext object.
+ *<p>
+ * This abstract class emulates some of the functionality found in the
+ * java.io.BufferedWriter and java.io.PrintWriter classes,
+ * however it differs in that it throws java.io.IOException from the print
+ * methods while PrintWriter does not.
+ * <p><B>Buffering</B>
+ * <p>
+ * The initial JspWriter object is associated with the PrintWriter object
+ * of the ServletResponse in a way that depends on whether the page is or
+ * is not buffered. If the page is not buffered, output written to this
+ * JspWriter object will be written through to the PrintWriter directly,
+ * which will be created if necessary by invoking the getWriter() method
+ * on the response object. But if the page is buffered, the PrintWriter
+ * object will not be created until the buffer is flushed and
+ * operations like setContentType() are legal. Since this flexibility
+ * simplifies programming substantially, buffering is the default for JSP
+ * pages.
+ * <p>
+ * Buffering raises the issue of what to do when the buffer is
+ * exceeded. Two approaches can be taken:
+ * <ul>
+ * <li>
+ * Exceeding the buffer is not a fatal error; when the buffer is
+ * exceeded, just flush the output.
+ * <li>
+ * Exceeding the buffer is a fatal error; when the buffer is exceeded,
+ * raise an exception.
+ * </ul>
+ * <p>
+ * Both approaches are valid, and thus both are supported in the JSP
+ * technology. The behavior of a page is controlled by the autoFlush
+ * attribute, which defaults to true. In general, JSP pages that need to
+ * be sure that correct and complete data has been sent to their client
+ * may want to set autoFlush to false, with a typical case being that
+ * where the client is an application itself. On the other hand, JSP
+ * pages that send data that is meaningful even when partially
+ * constructed may want to set autoFlush to true; such as when the
+ * data is sent for immediate display through a browser. Each application
+ * will need to consider their specific needs.
+ * <p>
+ * An alternative considered was to make the buffer size unbounded; but,
+ * this had the disadvantage that runaway computations would consume an
+ * unbounded amount of resources.
+ * <p>
+ * The "out" implicit variable of a JSP implementation class is of this type.
+ * If the page directive selects autoflush="true" then all the I/O operations
+ * on this class shall automatically flush the contents of the buffer if an
+ * overflow condition would result if the current operation were performed
+ * without a flush. If autoflush="false" then all the I/O operations on this
+ * class shall throw an IOException if performing the current operation would
+ * result in a buffer overflow condition.
+ *
+ * @see java.io.Writer
+ * @see java.io.BufferedWriter
+ * @see java.io.PrintWriter
+ */
+
+abstract public class JspWriter extends java.io.Writer {
+
+ /**
+ * Constant indicating that the Writer is not buffering output.
+ */
+
+ public static final int NO_BUFFER = 0;
+
+ /**
+ * Constant indicating that the Writer is buffered and is using the
+ * implementation default buffer size.
+ */
+
+ public static final int DEFAULT_BUFFER = -1;
+
+ /**
+ * Constant indicating that the Writer is buffered and is unbounded; this
+ * is used in BodyContent.
+ */
+
+ public static final int UNBOUNDED_BUFFER = -2;
+
+ /**
+ * Protected constructor.
+ *
+ * @param bufferSize the size of the buffer to be used by the JspWriter
+ * @param autoFlush whether the JspWriter should be autoflushing
+ */
+
+ protected JspWriter(int bufferSize, boolean autoFlush) {
+ this.bufferSize = bufferSize;
+ this.autoFlush = autoFlush;
+ }
+
+ /**
+ * Write a line separator. The line separator string is defined by the
+ * system property <tt>line.separator</tt>, and is not necessarily a single
+ * newline ('\n') character.
+ *
+ * @exception IOException If an I/O error occurs
+ */
+
+ abstract public void newLine() throws IOException;
+
+ /**
+ * Print a boolean value. The string produced by <code>{@link
+ * java.lang.String#valueOf(boolean)}</code> is written to the
+ * JspWriter's buffer or, if no buffer is used, directly to the
+ * underlying writer.
+ *
+ * @param b The <code>boolean</code> to be printed
+ * @throws java.io.IOException If an error occured while writing
+ */
+
+ abstract public void print(boolean b) throws IOException;
+
+ /**
+ * Print a character. The character is written to the
+ * JspWriter's buffer or, if no buffer is used, directly to the
+ * underlying writer.
+ *
+ * @param c The <code>char</code> to be printed
+ * @throws java.io.IOException If an error occured while writing
+ */
+
+ abstract public void print(char c) throws IOException;
+
+ /**
+ * Print an integer. The string produced by <code>{@link
+ * java.lang.String#valueOf(int)}</code> is written to the
+ * JspWriter's buffer or, if no buffer is used, directly to the
+ * underlying writer.
+ *
+ * @param i The <code>int</code> to be printed
+ * @see java.lang.Integer#toString(int)
+ * @throws java.io.IOException If an error occured while writing
+ */
+
+ abstract public void print(int i) throws IOException;
+
+ /**
+ * Print a long integer. The string produced by <code>{@link
+ * java.lang.String#valueOf(long)}</code> is written to the
+ * JspWriter's buffer or, if no buffer is used, directly to the
+ * underlying writer.
+ *
+ * @param l The <code>long</code> to be printed
+ * @see java.lang.Long#toString(long)
+ * @throws java.io.IOException If an error occured while writing
+ */
+
+ abstract public void print(long l) throws IOException;
+
+ /**
+ * Print a floating-point number. The string produced by <code>{@link
+ * java.lang.String#valueOf(float)}</code> is written to the
+ * JspWriter's buffer or, if no buffer is used, directly to the
+ * underlying writer.
+ *
+ * @param f The <code>float</code> to be printed
+ * @see java.lang.Float#toString(float)
+ * @throws java.io.IOException If an error occured while writing
+ */
+
+ abstract public void print(float f) throws IOException;
+
+ /**
+ * Print a double-precision floating-point number. The string produced by
+ * <code>{@link java.lang.String#valueOf(double)}</code> is written to
+ * the JspWriter's buffer or, if no buffer is used, directly to the
+ * underlying writer.
+ *
+ * @param d The <code>double</code> to be printed
+ * @see java.lang.Double#toString(double)
+ * @throws java.io.IOException If an error occured while writing
+ */
+
+ abstract public void print(double d) throws IOException;
+
+ /**
+ * Print an array of characters. The characters are written to the
+ * JspWriter's buffer or, if no buffer is used, directly to the
+ * underlying writer.
+ *
+ * @param s The array of chars to be printed
+ *
+ * @throws NullPointerException If <code>s</code> is <code>null</code>
+ * @throws java.io.IOException If an error occured while writing
+ */
+
+ abstract public void print(char s[]) throws IOException;
+
+ /**
+ * Print a string. If the argument is <code>null</code> then the string
+ * <code>"null"</code> is printed. Otherwise, the string's characters are
+ * written to the JspWriter's buffer or, if no buffer is used, directly
+ * to the underlying writer.
+ *
+ * @param s The <code>String</code> to be printed
+ * @throws java.io.IOException If an error occured while writing
+ */
+
+ abstract public void print(String s) throws IOException;
+
+ /**
+ * Print an object. The string produced by the <code>{@link
+ * java.lang.String#valueOf(Object)}</code> method is written to the
+ * JspWriter's buffer or, if no buffer is used, directly to the
+ * underlying writer.
+ *
+ * @param obj The <code>Object</code> to be printed
+ * @see java.lang.Object#toString()
+ * @throws java.io.IOException If an error occured while writing
+ */
+
+ abstract public void print(Object obj) throws IOException;
+
+ /**
+ * Terminate the current line by writing the line separator string. The
+ * line separator string is defined by the system property
+ * <code>line.separator</code>, and is not necessarily a single newline
+ * character (<code>'\n'</code>).
+ * @throws java.io.IOException If an error occured while writing
+ */
+
+ abstract public void println() throws IOException;
+
+ /**
+ * Print a boolean value and then terminate the line. This method behaves
+ * as though it invokes <code>{@link #print(boolean)}</code> and then
+ * <code>{@link #println()}</code>.
+ *
+ * @param x the boolean to write
+ * @throws java.io.IOException If an error occured while writing
+ */
+
+ abstract public void println(boolean x) throws IOException;
+
+ /**
+ * Print a character and then terminate the line. This method behaves as
+ * though it invokes <code>{@link #print(char)}</code> and then <code>{@link
+ * #println()}</code>.
+ *
+ * @param x the char to write
+ * @throws java.io.IOException If an error occured while writing
+ */
+
+ abstract public void println(char x) throws IOException;
+
+ /**
+ * Print an integer and then terminate the line. This method behaves as
+ * though it invokes <code>{@link #print(int)}</code> and then <code>{@link
+ * #println()}</code>.
+ *
+ * @param x the int to write
+ * @throws java.io.IOException If an error occured while writing
+ */
+
+ abstract public void println(int x) throws IOException;
+
+ /**
+ * Print a long integer and then terminate the line. This method behaves
+ * as though it invokes <code>{@link #print(long)}</code> and then
+ * <code>{@link #println()}</code>.
+ *
+ * @param x the long to write
+ * @throws java.io.IOException If an error occured while writing
+ */
+
+ abstract public void println(long x) throws IOException;
+
+ /**
+ * Print a floating-point number and then terminate the line. This method
+ * behaves as though it invokes <code>{@link #print(float)}</code> and then
+ * <code>{@link #println()}</code>.
+ *
+ * @param x the float to write
+ * @throws java.io.IOException If an error occured while writing
+ */
+
+ abstract public void println(float x) throws IOException;
+
+ /**
+ * Print a double-precision floating-point number and then terminate the
+ * line. This method behaves as though it invokes <code>{@link
+ * #print(double)}</code> and then <code>{@link #println()}</code>.
+ *
+ * @param x the double to write
+ * @throws java.io.IOException If an error occured while writing
+ */
+
+ abstract public void println(double x) throws IOException;
+
+ /**
+ * Print an array of characters and then terminate the line. This method
+ * behaves as though it invokes <code>print(char[])</code> and then
+ * <code>println()</code>.
+ *
+ * @param x the char[] to write
+ * @throws java.io.IOException If an error occured while writing
+ */
+
+ abstract public void println(char x[]) throws IOException;
+
+ /**
+ * Print a String and then terminate the line. This method behaves as
+ * though it invokes <code>{@link #print(String)}</code> and then
+ * <code>{@link #println()}</code>.
+ *
+ * @param x the String to write
+ * @throws java.io.IOException If an error occured while writing
+ */
+
+ abstract public void println(String x) throws IOException;
+
+ /**
+ * Print an Object and then terminate the line. This method behaves as
+ * though it invokes <code>{@link #print(Object)}</code> and then
+ * <code>{@link #println()}</code>.
+ *
+ * @param x the Object to write
+ * @throws java.io.IOException If an error occured while writing
+ */
+
+ abstract public void println(Object x) throws IOException;
+
+
+ /**
+ * Clear the contents of the buffer. If the buffer has been already
+ * been flushed then the clear operation shall throw an IOException
+ * to signal the fact that some data has already been irrevocably
+ * written to the client response stream.
+ *
+ * @throws IOException If an I/O error occurs
+ */
+
+ abstract public void clear() throws IOException;
+
+ /**
+ * Clears the current contents of the buffer. Unlike clear(), this
+ * method will not throw an IOException if the buffer has already been
+ * flushed. It merely clears the current content of the buffer and
+ * returns.
+ *
+ * @throws IOException If an I/O error occurs
+ */
+
+ abstract public void clearBuffer() throws IOException;
+
+ /**
+ * Flush the stream. If the stream has saved any characters from the
+ * various write() methods in a buffer, write them immediately to their
+ * intended destination. Then, if that destination is another character or
+ * byte stream, flush it. Thus one flush() invocation will flush all the
+ * buffers in a chain of Writers and OutputStreams.
+ * <p>
+ * The method may be invoked indirectly if the buffer size is exceeded.
+ * <p>
+ * Once a stream has been closed,
+ * further write() or flush() invocations will cause an IOException to be
+ * thrown.
+ *
+ * @exception IOException If an I/O error occurs
+ */
+
+ abstract public void flush() throws IOException;
+
+ /**
+ * Close the stream, flushing it first.
+ * <p>
+ * This method needs not be invoked explicitly for the initial JspWriter
+ * as the code generated by the JSP container will automatically
+ * include a call to close().
+ * <p>
+ * Closing a previously-closed stream, unlike flush(), has no effect.
+ *
+ * @exception IOException If an I/O error occurs
+ */
+
+ abstract public void close() throws IOException;
+
+ /**
+ * This method returns the size of the buffer used by the JspWriter.
+ *
+ * @return the size of the buffer in bytes, or 0 is unbuffered.
+ */
+
+ public int getBufferSize() { return bufferSize; }
+
+ /**
+ * This method returns the number of unused bytes in the buffer.
+ *
+ * @return the number of bytes unused in the buffer
+ */
+
+ abstract public int getRemaining();
+
+ /**
+ * This method indicates whether the JspWriter is autoFlushing.
+ *
+ * @return if this JspWriter is auto flushing or throwing IOExceptions
+ * on buffer overflow conditions
+ */
+
+ public boolean isAutoFlush() { return autoFlush; }
+
+ /*
+ * fields
+ */
+
+ /**
+ * The size of the buffer used by the JspWriter.
+ */
+ protected int bufferSize;
+
+ /**
+ * Whether the JspWriter is autoflushing.
+ */
+ protected boolean autoFlush;
+}
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org