JSP


Explain the scope of JSP objects.

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 [...]

FAQ Category: JSP.

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 transfered [...]

FAQ Category: JSP.

What are the types of JSP Comments?

There is only one type of JSP comment available by JSP specification. JSP Syntax: <%-- comment --%> This JSP comment tag tells the JSP container to ignore the comment part from compilation. That is, it is not considered for the content parsed for ‘response’. Example: <%-- This JSP comment part will not be included in the response object --%> Important Points: <!-- [...]

FAQ Category: JSP.

Explain the 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 The JSP implicit request object [...]

FAQ Category: JSP.

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 be [...]

FAQ Category: JSP.

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 error [...]

FAQ Category: JSP.

JSP


Java FAQ by Category

Java FAQ Highlights

Recent Java FAQ