Home » Categories » JSP
 

JSP

JavaServer Pages (JSP) is a Java technology that allows software developers to dynamically generate HTML, XML or other types of documents in response to a Web client request. The technology allows Java code and certain pre-defined actions to be embedded into static content.

The JSP syntax adds additional XML-like 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 Servlets 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.

"Java Server Pages" is a technology released by Sun.
A JavaServer Page may be broken down into the following pieces: * static data such as HTML,
* JSP directives such as the include directive,
* JSP scripting elements and variables,
* JSP actions,
* custom tags

JSP implicit objects

The following JSP implicit objects are exposed by the JSP container and can be referenced by the programmer:

out
    The JSPWriter used to write the data to the response stream.
page
    The servlet itself.
pageContext
    A PageContext instance that contains data associated with the whole page. A given HTML page may be passed among multiple JSPs.
request
    The HttpServletRequest object that provides HTTP request information.
response
    The HTTP response object.
session
    The HTTP session object that can be used to track information about a user from one request to another.
config
    Provides servlet configuration data.
application
    Data shared by all JSPs and servlets in the application.
exception
    Exceptions not caught by application code.
 

JSP Standard Tag Libraries(JSTL)


In addition to the pre-defined JSP actions, developers may add their own custom actions using the JSP Tag Extension API. Developers write a Java class that implements one of the Tag interfaces and provide a tag library XML description file that specifies the tags and the java classes that implement the tags.



Write a comment

  • Required fields are marked with *.

If you have trouble reading the code, click on the code itself to generate a new random code.
Security Code: