Java Interview Questions
28 / 30
Chapter 12
JSP
12.1
What is a JSP Page ?
A Java Server Page (JSP) is a text document that contains two types of text: static data and JSP elements. Static data can be
expressed in any text-based format, such as HTML or XML. JSP is a technology that mixes static content with dynamically-
generated content. See
JSP example here
.
12.2
How are the JSP requests handled ?
On the arrival of a JSP request, the browser first requests a page with a .jsp extension. Then, the Web server reads the request and
using the JSP compiler, the Web server converts the JSP page into a servlet class. Notice that the JSP file is compiled only on
the first request of the page, or if the JSP file has changed.The generated servlet class is invoked, in order to handle the browser’s
request. Once the execution of the request is over, the servlet sends a response back to the client. See
how to get Request
parameters in a JSP
.
Do'stlaringiz bilan baham: