JSP

Recent Tutorial

How to pre-compile JSP?

Add jsp_precompile as a request parameter and send a request to the JSP file. This will make the jsp pre-compile. Why it is mentioned as pre compile instead of compilation is that, the request is not served. That is, the JSP will not be executed and the request will not be serviced. Just it will […]
Published to JSP Tutorial on 21/05/2009.

Scope of JSP Objects

The availability of a JSP object for use from a particular place of the application is defined as the scope of that JSP object. Every object created in a JSP page will have a scope. Object scope in JSP is segregated into four parts and they are page, request, session and application. page ‘page’ scope […]
Published to JSP Tutorial on 10/06/2008.

Difference between forward and sendRedirect

forward Control can be forward to resources available within the server from where the call is made. This transfer of control is done by the container internally and browser / client is not involved. This is the major difference between forward and sendRedirect. When the forward is done, the original request and response objects are […]
Published to JSP Tutorial on 13/05/2008.

JSP Comments

There is only one type of JSP comment available by JSP specification. JSP Comment Syntax: <%-- comment --%> This JSP comment tag tells the JSP container to ignore the comment part from compilation. That is, the commented part of source code is not considered for the content parsed for ‘response’. Example: <%-- This JSP comment […]
Published to JSP Tutorial on 13/05/2008.

JSP Implicit Objects

JSP Implicit objects are created by the web container. These implicit objects are Java objects that implement interfaces in the Servlet and JSP API. Scripting elements in a JSP page can make use of these JSP implicit objects. There are nine (9) JSP implicit objects available. JSP Implicit Objects are as follows: request implicit object […]
Published to JSP Tutorial on 11/05/2008.

Difference between JSP include directive and JSP include action

<%@ include file=”filename” %> is the JSP include directive. At JSP page translation time, the content of the file given in the include directive is ‘pasted’ as it is, in the place where the JSP include directive is used. Then the source JSP page is converted into a java servlet class. The included file can […]
Published to JSP Tutorial on 09/05/2008.

Difference between _jspService() and other life cycle methods.

JSP contains three life cycle methods namely jspInit( ), _jspService() and jspDestroy(). In these, jspInit() and jspDestroy() can be overridden and we cannot override _jspService(). The contents what we write in the JSP will go into _jspService() because we are implicitly implementing it. If we again try to override it explicitly, JSP compliler will giver […]
Published to JSP Tutorial on 05/05/2008.

JSP Life Cycle – explain.

JSP’s life cycle can be grouped into following phases. 1. JSP Page Translation: A java servlet file is generated from the JSP source file. This is the first step in its tedious multiple phase life cycle. In the translation phase, the container validates the syntactic correctness of the JSP pages and tag files. The container […]
Published to JSP Tutorial on 05/05/2008.