JSP

pageEncoding JSP page directive with Example

"pageEncoding" is one of the 14 attributes supported by JSP page directive. pageEncoding is used to read correctly the file data characters available on OS file system by JSP. If pageEncoding attribute is ignored by the Programmer, sometimes, it may lead problems with Cyrillic and Chinese characters especially with PHP language. A file may contain …

pageEncoding JSP page directive with Example Read More »

errorPage isErrorPage exception JSP page directive with Example

"errorPage" and "isErrorPage" are the two of 14 attributes supported by page directive. Now let us what are errorPage isErrorPage exception JSP 1. What is "errorPage"? Any JSP file declared with errorPage, when generates exceptions, can send the exceptions to another JSP file that is declared with isErrorPage. errorPage attribute is used to specify the …

errorPage isErrorPage exception JSP page directive with Example Read More »

import JSP page directive with Example

"import" is one of the 14 attributes, JSP page directive supports. import JSP is used to import packages in JSP. Example: <%@ page import="java.util.List" %> : imports only one interface List <%@ page import="java.util.*" %> <%@ page import="java.net.*" %> <%@ page import="java.io.*" %> In the above three separate import statements, three packages are imported. JSP …

import JSP page directive with Example Read More »

JSP Page Directive Tutorial 14 Attributes Examples

"page directive" is one of the 3 directives, Java supports. "page" directive gives information, to the container, that can be applied to whole JSP file (page). General Syntax: <%@ page attributeName=”value” %> To give the information, page directive comes with 14 attributes. Each attribute gives a special processing information to the container. JSP Page Directive …

JSP Page Directive Tutorial 14 Attributes Examples Read More »

implicit object exception JSP Example

implicit object exception JSP Explanation Example Syntax "exception" is one of the 9 implicit objects, supported by Java. "exception" is an object of java.lang.Throwable, available to the programmer to be used directly in the code without creating it. The exception object cannot be used always and everywhere in the JSP code. It is specially used …

implicit object exception JSP Example Read More »

implicit object response JSP Example

"response" is one of the 9 implicit objects, JSP supports. It is an object of javax.servlet.http.HttpServletResponse interface. This object is used by the Programmer to send cookies to the client, to use HTTP status codes in programming and to redirect the client to a new page. Following are some important methods of HttpServletResponse that can …

implicit object response JSP Example Read More »

implicit object request JSP Example

1. What is implicit object request JSP? request is one of the 9 implicit objects, JSP supports. request is an object of javax.servlet.http.HttpServletRequest interface. Being implicit, it comes into existence (or created) automatically and the Programmer can use the object in his code without the necessity of creation. 2. With implicit object request JSP, what …

implicit object request JSP Example Read More »

implicit object application JSP Example

"application" is one of the 9 implicit objects, JSP supports. The "application" object represents an object of javax.servlet.ServletContext interface. This we have seen in Servlets at Reading Servlets Context Parameter with Example. Let us write a different program with JSP code. implicit object application JSP represents a global object that can be used by all …

implicit object application JSP Example Read More »

implicit object config JSP Example

Note: It is advised to read about ServletConfig interface in Servlets where at length discussed its importance, methods. One example is also given using ServletConfig in Servlet web xml init param Example using ServletConfig. config is one of the 9 implicit objects, JSP supports. config is an object of javax.servlet.ServletConfig interface. This interface is used …

implicit object config JSP Example Read More »

Scriptlet Expression Declaration JSP Example

Scriptlet, Expression and Declaration are the three building blocks of JSP code. Let us see the appropriate places when to use them and finally we will do one example where all the three are used. Note: It is advised to go through the separate examples on Scriptlets, expressions and declarations before going through this. Here, …

Scriptlet Expression Declaration JSP Example Read More »