For 1 st time when we accessed the JSP page server is slower after that it will faster .
When we access JSP it is converted to it’s Servlet class before it can be used to service client side request .
For each request the JSP engine checks the timestamps of source JSP page and corresponding Servlet if JSP is newer then it will be again converted to it’s equivalent Servlet. This process consists of 7-phases.
Elements of JSP JSP tag description Syntax directive Specifies translation time instruction to JSP engine <%@Directives%> Declaration It declare & define variables , methods. <%! Some java code %> Scriptlets Tags are used to embed java code in JSp page. Allows to write free-form java code in JSP page <%count++%> Expression Used to print value in the out put html file <%=an expression%> Action Provides request time instructions to the JSp engine. <jsp:actionname/> comment Used for documentation <%--Any text--%>
When the browser asks the Web server for a JSP, the Web server passes control to a JSP container .
A container works with the Web server to provide the runtime environment and other services a JSP needs .
It knows how to understand the special elements that are part of JSPs . Because this is the first time this JSP has been invoked , the JSP container converts it into an executable unit called a Servlet .
In session management whenever a request comes for any resource, a unique token is generated by the server and transmitted to the client by the response object and stored on the client machine as a cookie . Session management done by:
Hidden Form Fields
Program for math calculation Declarative tag Expression tag