Scripting Elements in JSP (Java Server Pages)

Scripting Elements in Java Server Pages

JSP scripting elements allow you to use Java programming language statements in your JSP pages. Scripting elements are typically used to create and access objects, define methods, and manage the flow of control. Many tasks that require the use of scripts can be eliminated by using custom tag libraries, in particular the JSP Standard Tag Library. Because one of the goals of JSP technology is to separate static data from the code needed to dynamically generate content, very sparing use of JSP scripting is recommended. Nevertheless, there may be some circumstances that require its use.
1. JSP Declarations.
2. JSP Expressions.
3. JSP Scriptlets. Continue reading

Directives in JSP (Java Server Pages)

1 Comment Leave a reply                     

Directives in Java Server Pages

A directive gives further information to the JSP Container that applies to how the page is compiled. An example of this is to reference Java packages in a manner similar to the import statement.

Directives are classified in following categories:
1. Page Directive.
2. Include Directive.
3. Taglib Directive.
Continue reading

Life Cycle of JSP (Java Server Pages)

2 Comments Leave a reply                     

About Life Cycle and Uses of JSP Technology

JSP stands for Java Server Pages. It is Java Code inside HTML. It is used for View in Model-View-Controller architecture.

Using JSP, developer can generate dynamic content on web pages. It is capable to do almost all things that a Servlet can do. JSP is server side technology. Major advantage of using JSP is that it separates business logic from presentation. Business logic can be implemented in Java and dynamic presentation content is sent to client using JSP to display it on browser. Continue reading