Setup Menus in Admin Panel

1. What is JSP?

JSP

1.1 What is the difference between servlets and JSP?

1.2 Why Use JSP?

2 Jsp life cycle

3.JSP Elements

 

 

Java Server Pages (JSP) is a server side technology for developing dynamic web pages. This is mainly used for implementing presentation layer (GUI Part) of an application. A complete JSP code is more like a HTML with bits of java code in it. JSP is an extension of servlets and every JSP page first gets converted into servlet by JSP container before processing the client’s request.

 

The JSP Translation Phase

jsp_lifecycle-1

Figure shows that there are two outputs within the translation phase. The first is an interim output: a Java source     file for a servlet. The second is the compiled class file from the servlet source.

1.1 JSP Processing:

The following steps explain how the web server creates the web page using JSP:

  • As with a normal page, your browser sends an HTTP request to the web server.
  • The web server recognizes that the HTTP request is for a JSP page and forwards it to a JSP engine. This is done by using the URL or JSP page which ends with .jsp instead of .html.
  • The JSP engine loads the JSP page from disk and converts it into a servlet content. This conversion is very simple in which all template text is converted to println( ) statements and all JSP elements are converted to Java code that implements the corresponding dynamic behavior of the page.
  • The JSP engine compiles the servlet into an executable class and forwards the original request to a servlet engine.
  • A part of the web server called the servlet engine loads the Servlet class and executes it. During execution, the servlet produces an output in HTML format, which the servlet engine passes to the web server inside an HTTP response.
  • The web server forwards the HTTP response to your browser in terms of static HTML content.
  • Finally web browser handles the dynamically generated HTML page inside the HTTP response exactly as if it were a static page.

JSP tags can be used for a variety of purposes, such as retrieving information from a database or registering user preferences, accessing JavaBeans components, passing control between pages and sharing information between requests, pages etc.

January 16, 2016

0 responses on "1. What is JSP?"

Leave a Message

Your email address will not be published. Required fields are marked *

About Us

Pradeep Academy is an online & Training institute To make learning easy, interesting, affordable and accessible to millions of learners across the Globe. To create an alternative learning platform, using a unique learning methodology of live online interactive courses along with 24x7 support. We aim to empower our customers with skills which will help them get an edge in their careers and improve their lives.

Contact Us

Address :

PradeepIT Consulting Services Pvt Ltd

205,Brigade gardens, No.19 Church Street , Bangalore – 560001, Karnataka, India

Email : [email protected]
Ph No: 08047363377
Web: https://academy.pradeepit.com
top
© Pradeep Academy.  Design & Developed by