Hey Guys.... here I will try to explain basic details of JSP which might be useful for the people who are beginners.
JSP :JSP stands for JAva Server Pages.
Most of you know might know about HTML which is used to display static content.Using JSP we can write pages which displays dynamic content to the user based on server response.
Main advantage of JSP is it is built on Servlet API so it has acess to all Java API like JDBC,JNDI,JAXP.
Let me explain lifeCycle of JSP:
JSP life cycle has below three steps:
1.Initilisation
2.Execution
3.CleanUp
Initilisation :
jspInit() method is executed during phase. this method will execute when JSP is loaded into memory.
once JSP is loaded, JSP container converts it to servlet and compiles it.
Then JSP container passes request to servlet container. Servlet container then executes the servlet which sends the response to client
Execution Phase
:During this phase, jsp will process all requests from users and sends the response.
_jspService(HttpServletRequesst,HttpServletResponse) method is used to process all user requests.
This method will be executed once for each request.
CleanUP :
during this phase,the resources which are allocated during initilisation phase are cleaned.
jspDestroy( ) method will be executed during this phase.
JSP :JSP stands for JAva Server Pages.
Most of you know might know about HTML which is used to display static content.Using JSP we can write pages which displays dynamic content to the user based on server response.
Main advantage of JSP is it is built on Servlet API so it has acess to all Java API like JDBC,JNDI,JAXP.
Let me explain lifeCycle of JSP:
JSP life cycle has below three steps:
1.Initilisation
2.Execution
3.CleanUp
Initilisation :
jspInit() method is executed during phase. this method will execute when JSP is loaded into memory.
once JSP is loaded, JSP container converts it to servlet and compiles it.
Then JSP container passes request to servlet container. Servlet container then executes the servlet which sends the response to client
Execution Phase
:During this phase, jsp will process all requests from users and sends the response.
_jspService(HttpServletRequesst,HttpServletResponse) method is used to process all user requests.
This method will be executed once for each request.
CleanUP :
during this phase,the resources which are allocated during initilisation phase are cleaned.
jspDestroy( ) method will be executed during this phase.
No comments:
Post a Comment