JSP pages in servlet

By: aathishankaran Printer Friendly Format    

JSP pages in servlet

JSP pages are high-level extension of servlet and it enables the developers to embed java code in html pages. JSP files are finally compiled into a servlet by the JSP engine. The engine to serve the requests uses compiled servlet.

javax.servlet.jsp package defines two classes:

·         JSPPage

·         HttpJspPage

These classes define the interface for the compiled JSP page. These interfaces are:

  • jspInit()
  • jspDestroy()
  • _jspService(HttpServletRequest request,HttpServletResponse response)

In the compiled JSP file these methods are present. Programmer can define jspInit() and jspDestroy() methods, but the _jspService(HttpServletRequest request,HttpServletResponse response) method is generated by the JSP engine


By using the classes we can make connection with server and we can intract with server. We can transfer and getting the data from server. These three classes mainly used for get connection with server and to transfer the data. For server-based program we can use this classes


Most Viewed Articles (in JSP )

Latest Articles (in JSP)

Comment on this tutorial