Archive for the ‘ JSP ’ Category

Lifecycle of a JSP Page

Let us take a look at the life-cycle of a JSP Page

• When a first request is made to the server the JSP files are compiled into servlets.

Lifecycle of a JSP Page



Read the rest of this entry »

Dealing with Java Server Page and Servlets

Let’s see how to deal with Java Server Page and Servlets, and their uses…

• Read form data
• Read HTTP request headers

Dealing with Java Server Page and Servlets


• Set HTTP status codes and response headers

• Use cookies and session tracking

• Share data among servlets

• Remember data between requests

• Get fun, high-paying jobs

An alternative JSP syntax

Here’s the example of JSP syntax
Read the rest of this entry »

Directives in JSP

directives of JSP

• Directives are used to control how the Web container translates and executes the JSP page

• They do not directly produce any visible output, but tell the engine what to do with the rest of the JSP page.

• JSP directives are always enclosed within the < %@ ... % > tag.

• The general Syntax of a Directive
< %@ directive {attribute =“value”} % >
• The two primary directives are page and include.

• Page directive

• Include directive

• Taglib Directive