hardyer.blogg.se

Web application using jsp and servlet source code
Web application using jsp and servlet source code











web application using jsp and servlet source code

After that, Servlet page is compiled by the compiler and gets converted into the class file. The JSP translator is a part of the web server which is responsible for translating the JSP page into Servlet. Note: jspInit(), _jspService() and jspDestroy() are the life cycle methods of JSP.Īs depicted in the above diagram, JSP page is translated into Servlet by the help of JSP translator. Destroy ( the container invokes jspDestroy() method).Request processing ( the container invokes _jspService() method).Initialization ( the container invokes jspInit() method).Instantiation (Object of the Generated Servlet is created).Classloading (the classloader loads class file).Moreover, we can use EL, implicit objects, etc. In JSP, we can use many tags such as action tags, JSTL, custom tags, etc.

web application using jsp and servlet source code

The Servlet code needs to be updated and recompiled if we have to change the look and feel of the application. If JSP page is modified, we don't need to recompile and redeploy the project. 3) Fast Development: No need to recompile and redeploy In Servlet technology, we mix our business logic with the presentation logic. JSP can be easily managed because we can easily separate our business logic with presentation logic. In addition to, we can use implicit objects, predefined tags, expression language and Custom tags in JSP, that makes JSP development easy. We can use all the features of the Servlet in JSP. JSP technology is the extension to Servlet technology. They are as follows: 1) Extension to Servlet There are many advantages of JSP over the Servlet. It provides some additional features such as Expression Language, Custom Tags, etc. The JSP pages are easier to maintain than Servlet because we can separate designing and development. It can be thought of as an extension to Servlet because it provides more functionality than servlet such as expression language, JSTL, etc.Ī JSP page consists of HTML tags and JSP tags. JSP technology is used to create web application just like Servlet technology.













Web application using jsp and servlet source code