JSP API

javax.elProvides the API for the Unified Expression Language shared by the JSP 2.1 and JSF 1.2 technologies
javax.servlet.jspClass and interfaces for the Core JSP 2.1 API.
javax.servlet.jsp.tagextClasses and interfaces for the definition of JavaServer Pages Tag Libraries.

The javax.servlet.jsp contains the following:

Interface Summary

HttpJsppageThe HttpJsppage interface describes the interaction that a JSP page Implementation Class must satisfy when using the HTTP protocol.
JspApplicationContextStores application-Scoped information relevant to JSP containers.
JspPageThe JspPage interface describe the generic interaction that a jsp Page Implementation class must stisfy; pages that use the HTTP protocal are describe by the HttpJspPage interface.

Class Summary

ErrorDataContains information about an error,for error pages.
JspContextJspContext serves as the base class for the PageContext class and abstarcts all information that is not specific to servlets.
JspEngineInfoThe JspEngineInfo is an abstarct class that provide information on the current JSP engine.
JspFactoryThe JspFactory is an abstract class that defines a number of factory methods available to a JSP page at runtime for the purpose of creating instance of various interface and classes used to support the Jsp implementation.
JspWriterThe 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.
PageContextPageContext extends JspContext to provide useful context information for when JSP technology is used in a Servlet environment.

Exception Summary

JspExceptionA generic exception known to the JSP engine; uncaught JspExceptions will result in an invocation of the errorpage machinery.
JspTagExceptionException to be used by a Tag Handler to indicate some unrecoverable error.
SkipPageExceptionException to indicate the calling page must cease evaluation.

Interface Summary

HttpJspPageThe HttpJspPage interface describes the interaction that a JSP Page Implementation Class must satisfy when using the HTTP protocol.
JspApplicationContextStores application-scoped information relevant to JSP containers.
JspPageThe 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.

Class Summary

ErrorDataContains information about an error, for error pages.
JspContextJspContext serves as the base class for the PageContext class and abstracts all information that is not specific to servlets.
JspEngineInfoThe JspEngineInfo is an abstract class that provides information on the current JSP engine.
JspFactoryThe 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.
JspWriterThe 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.
PageContextPageContext extends JspContext to provide useful context information for when JSP technology is used in a Servlet environment.

Exception Summary

JspExceptionA generic exception known to the JSP engine; uncaught JspExceptions will result in an invocation of the errorpage machinery.
JspTagExceptionException to be used by a Tag Handler to indicate some unrecoverable error.
SkipPageExceptionException to indicate the calling page must cease evaluation.

Every class which is generated for the JSP must implement "javax.servlet.jsp.JspPage" interface or "javax.servlet.jsp.HttpJspPage" interface
Tomcat people provide a base class as org.apache.jasper.runtime.HttpJspBaSe class for implementing above two interfaces so any servlet generated by tomcat extending HttpJspBase class

javax.servlet.jsp.JspPage interface

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.

Two plus One Methods

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.
A class implementing this interface is responsible for invoking the above methods at the appropriate time based on the corresponding Servlet-based method invocations.
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.

_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.
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.

The specific signature depends on the protocol supported by the JSP page.

public void _jspService(ServletRequestSubtype request,

ServletResponseSubtype response)

throws ServletException, IOException;


Method Summary

voidjspDestroy()
The jspDestroy() method is invoked when the JSP page is about to be destroyed.
voidjspInit() The jspInit() method is invoked when the JSP page is initialized.

The HttpJspPage interface describes the interaction that a JSP Page Implementation Class must satisfy when using the HTTP protocol.
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.

voidjspService(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
The _jspService()method corresponds to the body of the JSP page.)

References : oracle « Privious Post » « Next Post » share on :        :  

Love to hear your Views / Guidance / Recommendations on this Post…

Explore the Technology World

Computer Programming Terminologies Computer Programming Terminology is a general word for the group of specialized words or meanings relating to Computer Programming, and also the study of such t ...Read MoreNew features in JDK 12 with IntelliJ IDEADeveloped by JetBrains (formerly known as IntelliJ) ,IntelliJ IDEA is a Java integrated development environment (IDE) for developing computer software. It is av ...Read MoreGoogle Pay API Implementation Demo for AndroidIn this youtube Channel by Android Developers ,Learn how to implement the Google Pay API for Android with just a few lines of code and how it works with your ex ...Read MoreUnit Testing in .NET Core and Azure Devops pipelineUnit testing is a software testing method by which individual units of source code, usage procedures,sets of one or more computer program modules together with ...Read MoreThe mind behind Linux & GIT : Linus TorvaldsLinus Torvalds transformed technology twice — first with the Linux kernel, which helps power the Internet, and again with Git, the source code management ...Read MoreTensorflow and deep learningWith Tensorflow ,deep machine learning transitions from an area of research into mainstream software engineering. ...Read MoreJava program to return all possible permutations from collection of distinct numbersexample of Java program to return all possible permutations from collection of distinct numbers ...Read MoreReal Time Analytics with Spring Application Development FrameworkSpring is the most popular application development framework for enterprise Java.Millions of developers use Spring to build simple, truly portable, fast and fle ...Read MorePath Setting in Java When an application is launched from command prompt Windows OS searches for the executable program in the current working directory. The prompt throws an error ...Read MoreFacebook | whatsapp|Github | Twitter | LinkedIn | Youtube| reddit About | Cookies-Policy | Disclaimer | Site Map | Contact

Call / Visit for New Batch

Services

Why Join Us

  • ➯ Free Demo Classes
  • ➯ No Registration Fee
  • ➯ Interview Questions
  • ➯ Study Materials
  • ➯ Softwares
  • ➯ Aptitude & Reasoning
  • ➯ Placement Assitance

Address

  • MyJava Training Institute ,
  • Plot No.243 , shop No 14 ,
  • Secnd Floor , Zone-II ,
  • M.P.Nagar , Bhopal,
  • Madhya Pradesh ( 462011 )
  • ☎  08871209400 , 7987028543
  • 🌐 www.myjava.in
FacebookGoogle +TwitterYouTube

MyJava - java Training Institute