A JSP declaration always defined inside the class but outside the servise method or any other method.I.e Declaration are always ststic or instance members of the servlet class. <%!....... ; %>
E.g: BasiCounter.jsp
<html><body>
<%! int count=0 ; %>
The Page Count is now :
<%=++count%>
</html></body>
Sunday, April 5, 2009
7. JSP Implicit Objects
In JSP these implicit objects directly use instead of creating new object and using it.
API Implicit Object
JspWriter out
HttpServletRequest request
HttpServletResponse response
HttpSession session
ServletContext application
ServletConfig config
Throwable exception
PageContext pageContext
Object page
API Implicit Object
JspWriter out
HttpServletRequest request
HttpServletResponse response
HttpSession session
ServletContext application
ServletConfig config
Throwable exception
PageContext pageContext
Object page
Subscribe to:
Comments (Atom)