Show TOC Start of Content Area

Object documentation JSP Servlet  Locate the document in its SAP Library structure

Definition

The JSP servlet is implemented in the JSPServlet class that is part of the J2EE Engine’s Web Container. It is declared in the global-web.xml descriptor. Since it is mapped to the *.jsp URL pattern, it processes requests to JSP pages that are deployed on the Web Container.

Use

The JSP servlet main function is to find the requested JSP file, to parse it and to compile it if it was not compiled. It also provides life cycle management of the servlet implementation of that JSP – that is, initializes it and calls its service method.

The JSP servlet also checks if any changes have been made to the requested JSP file. If the file is updated, it again parses the JSP source file and compiles it before it initializes and calls the service method of the generated servlet implementation.

Note

You must make sure you do not map any component to the *.jsp and the *.JSP patterns in the web.xml descriptor of your Web application, otherwise you can no longer use the functions of the JSP servlet and the JSP pages that are part of the application will not work appropriately.

When you declare your JSP in the web.xml descriptor of your Web application, it is invoked based on the URL pattern you have mapped it to and the JSP servlet is not used in this case.

 

End of Content Area