JSP

Cookies JSP Add Get Cookie Value

Note: You can see the JESSIONID (Session ID) in the output screens at the end. Note: For better understanding, the subject is discussed in Question/Answer format. Note: Before going into this example, it is advised to go through the Cookie API methods and their explanation because these methods are used…

Read Client Form Data JSP 3 Ways Example

request is an object of HttpServletRequest and is one of the 9 implicit objects, JSP supports. request object is used to retrieve client’s system (like IP address) information, client’s browser (header) information and the data entered by the client in the <form> fields. To retrieve what the client entered in…

sendRedirect JSP Example

In the example, client sends user name to login (no password for simplicity). Server validates and sends back result of validation. If user name is successful, sends message "Login is Success" and fails sends a new login form to client to enter a new user name and repeat the process…

Difference between JSP forward and redirect

JSP forward vs JSP redirect The differenes are same as in the case of Servlets disucssed in 20 differences between forward and sendRedirect Methods. Anyhow, the same is reproduced replacing some minor terms. This posting discusses the difference between <jsp:forward> action and response.sendRedirect() method. Let us tabulate the differences of…

JavaBean JSP Example

One of the best advantages of JSP is the usage of Java beans. JSP can make of JavaBean in its code. JSP links with JavaBean with jsp:useBean tag. For this reason, JSPs are much used in frameworks like Struts. 1. What is JavaBean? or 2. What are JavaBean API specifications?…

forward action with Parameters JSP Example

We studied jsp:forward earlier, the forward action usage, importance and when to prefer over jsp:include. Now let us go for the same jsp:forward but with parameters. With this feature supported by JSP, one JSP file can send the client request to another JSP file to fulfill, with extra information known…

Difference include action vs forward action JSP

include action vs forward action JSP Before going into this tabulation of include action vs forward action JSP, is is advised to read clearly about jsp:include action and jsp:forwrd action. The examples are given in simple terms and screenshots of explanation. Difference comes in the way they are treated by…

forward Action JSP Example jsp:forward

The JSP forward action is similar to JSP include but with a small difference. In include directive, output of both JSP files goes to client. But in forward action, client gets only one JSP file content. Client gets included file content only but not including file. The JSP forward action…

Difference include directive vs include action JSP

Knowing the difference between JSP include directive and JSP include action is very important to a Programmer in terms of performance and for a fresher for interviews. Basically both are used to include HTML static page contents or a dynamic JSP page contents in another JSP file. We know in…

forward action with Parameter passing Example JSP

forward action with Parameter JSP We have seen earlier simple <jsp:forward> action. Now let us see the same forward action with an extra feature of parameters passing. With jsp:forward action, parameters can also be passed to including page. Included page reads the parameters from the including page. start reading forward…

include action JSP Example jsp:include

include action JSP Example It is similar to include directive of syntax <%@ include file="somefile" %> . But they differ in how container treats or execute them. The differences we see later and let us first go into the code include action JSP Example. In include action, at request time,…

Standard Action tags JSP

Standard Action tags JSP specify the behavior of JSP container. JSP comes with 10 action tags. Each action tag has a specific job to perform. Action tags are used in coding to control the flow among JSP pages, to forward the client request to another page, to use with JavaBeans…

isELIgnored JSP page directive with Example

The JSP 2.0 technology supports the usage of Expression Language (EL). With EL, it is easier to access applicaton variables using JavaBeans. EL also comes with expressions. The isELIgnored attribute value informs the container whether to evaluate or execute EL expression present in the JSP or not. isELIgnored JSP is…

language JSP page directive with Example

language JSP page directive with Example language JSP is one of the 14 attributes, JSP supports. This attribute tells the container which language is being used to write the JSP page. Programmer declares the language with this attribute. language JSP Syntax: <%@ page language="java" %> The default language is Java…

isThreadSafe JSP page directive with Example

"isThreadSafe" is one of the 14 attributes page directive support. This attribute takes boolean values of true or false indicating the JSP page can be safe in multithreaded environment or not. The default value is true. Syntax of isThreadSafe JSP <%@ page isThreadSafe="true" %> When set to true, the same…

session JSP page directive with Example

By nature, HTTP protocol is stateless and connectionless protocol. Stateless means, the server does not remember the client when once response is delivered. All the client data is deleted on server. Sometimes, client would like to do many interactions with the server to get complete information of a database table…