Life cycle/Architechure of a JSP
The JSP pages follows these phases:
Translation of JSP Page
Compilation of JSP Page
Classloading (class file is loaded by the
classloader)
Instantiation (Object of the Generated Servlet is
created).
Initialization ( jspInit() method is invoked by
the container).
Reqeust processing ( _jspService() method is
invoked by the container).
Destroy ( jspDestroy() method is invoked by the
container).
Note: jspInit(),
_jspService() and jspDestroy() are the life cycle methods of
JSP.
JSP Implicit Objects
There are 9 jsp implicit objects. These
objects are created by the web
container that are available
to all the jsp pages.
S.No
|
Object
|
Type
|
1
|
out
|
javax.servlet.jsp.JspWriter
|
2
|
request
|
javax.servlet.http.HttpServletRequest
|
3
|
response
|
javax.servlet.http.HttpServletResponse
|
4
|
config
|
javax.servlet.ServletConfig
|
5
|
application
|
javax.servlet.ServletContext
|
6
|
session
|
javax.servlet.http.HttpSession
|
7
|
exception
|
java.lang.Throwable
|
8
|
pageContext
|
PageContext
|
9
|
page
|
java.lang.Object
|
No comments:
Post a Comment