JavaServer Pages (JSP) API Packages

JavaServer Pages API has the following packages :
  1. javax.servlet.jsp
  2. javax.servlet.jsp.tagext
Package javax.servlet.jsp 

Following are the interfaces include by javax.servlet.jsp package.

1. HttpJspPage : The HttpJspPage interface describes the interaction that a JSP Page Implementation Class must satisfy when using the HTTP protocol.

Method of HttpJspPage interface: (a) public void _jspService()

(a) public void _jspService() : 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. _ (underscore) stands that this method can not be override.

2. JspPage : 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.

Methods of JspPage interface: (a) public void jspInit () (b) public void jspDestroy()

(a) public void jspInit () : The jspInit() method is invoked when the JSP page is initialized. It is the responsibility of the JSP implementation 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. 

(b) public void jspDestroy() : 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.

Following are the classes include by javax.servlet.jsp package.

1. JspEngineInfo : The JspEngineInfo is an abstract class that provides information on the current JSP engine.

2. JspFactory : 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.

3. JspWriter : 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.

4. PageContext : A PageContext instance provides access to all the namespaces associated with a JSP page, provides access to several page attributes, as well as a layer above the implementation details.

Following are the exceptions include by javax.servlet.jsp package.

1. JspException : A generic exception known to the JSP engine; uncaught JspExceptions will result in an invocation of the errorpage machinery.

2. JspTagException : Exception to be used by a Tag Handler to indicate some unrecoverable error.

 

Package javax.servlet.jsp.tagext 

Following are the interfaces include by javax.servlet.jsp.tagext package.

1. BodyTag : The BodyTag interface extends IterationTag by defining additional methods that let a tag handler manipulate the content of evaluating its body.

2. IterationTag : The IterationTag interface extends Tag by defining one additional method that controls the reevaluation of its body.

3. Tag : The interface of a simple tag handler that does not want to manipulate its body.

4. TryCatchFinally : The auxiliary interface of a Tag, IterationTag or BodyTag tag handler that wants additional hooks for managing resources.

Following are the classes include by javax.servlet.jsp.tagext package.

1. BodyContent : An encapsulation of the evaluation of the body of an action so it is available to a tag handler.

2. BodyTagSupport : A base class for defining tag handlers implementing BodyTag.

3. PageData : Translation-time information on a JSP page.

4. TagAttributeInfo : Information on the attributes of a Tag, available at translation time.

5. TagData : The (translation-time only) attribute/value information for a tag instance.

6. TagExtraInfo : Optional class provided by the tag library author to describe additional translation-time information not described in the TLD.

7. TagInfo : Tag information for a tag in a Tag Library; This class is instantiated from the Tag Library Descriptor file (TLD) and is available only at translation time.

8. TagLibraryInfo : Translation-time information associated with a taglib directive, and its underlying TLD file.

9. TagLibraryValidator : Translation-time validator class for a JSP page.

10. TagSupport : A base class for defining new tag handlers implementing Tag.

11. TagVariableInfo : Variable information for a tag in a Tag Library; This class is instantiated from the Tag Library Descriptor file (TLD) and is available only at translation time.

12. ValidationMessage : A validation message from a TagLibraryValidator.

13. VariableInfo : Information on the scripting variables that are created/modified by a tag (at run-time).

No comments: