| Javaserver Pages |
Article Index for Javaserver |
Articles about Javaserver Pages |
Website Links For Javaserver Pages |
Information AboutJavaserver Pages |
| CATEGORIES ABOUT JAVASERVER PAGES | |
| java enterprise platform | |
| java specification requests | |
| template engines | |
|
The JSP syntax adds additional XML tags, called JSP actions, to be used to invoke built-in functionality. Additionally, the technology allows for the creation of JSP tag libraries that act as extensions to the standard HTML or XML tags. Tag libraries provide a Platform Independent way of extending the capabilities of a Web Server . JSPs are compiled into Java Servlet s by a JSP Compiler . A JSP compiler may generate a servlet in Java code that is then compiled by the Java compiler, or it may generate Byte Code for the servlet directly. In either case, it is helpful to understand how the JSP compiler transforms the page into a Java servlet. For an example, consider the input Here , and its resulting generated Java Servlet Here . JSP AND SERVLETS Architecturally speaking, JSP can be viewed as a high-level abstraction of servlets that is implemented as an extension of the Servlet 2.1 API. Both servlets and JSPs were originally developed by Sun Microsystems . Starting with version 1.2 of the JSP specification, JavaServer Pages have been developed under the Java Community Process . JSR 53 defines both the JSP 1.2 and Servlet 2.4 specifications and JSR 152 defines the JSP 2.0 specification. As Of 2006 the JSP 2.1 specification is being developed under JSR 245. JSP SYNTAX A JavaServer Page may be broken down into the following pieces:
Static data ''Static'' data is written out to the HTTP response exactly as it appears in the input file. Thus a valid JSP input would be a normal HTML page with no embedded java or actions. In that case, the same data would be sent in the response each and every time by the web server. JSP directives JSP directives control how the JSP compiler generates the Servlet . The following directives are available:
<%@ include file="somefile.ext" %>
|