Java Server Page (JSP)

Java Server Page (JSP) is a way of creating dynamic web content using Java without knowing Java. Sounds good? Not so fast, the JSP API is not that straight forward. It is easier than learning Java, but it isn't all that simple. Writing in JSP is writing Java Servlets by proxy. JSP is java injection... it is written in a .jsp file, but then compiled into a java servlet to be run on a servlet container. It still throws exceptions because JSP is java by proxy. I think of it as proxy java. Still easier than java but really just an extention to the java world.

JSP Pages... is an oxy moron. The P in JSP stands for page. That is like saying Java Server Page Page. By the way...

CREATED 2012-11-17 16:08:34.0


UPDATED 2012-11-17 16:08:34.0


JSP Tag Libraries are referenced by uri's. The library reference appears in a JSP directive taglib at the top of the jsp file. as <%@taglib prefix="c" uri="" %> There are five different uri's to identify the five parts of JSP. Each of the uri's begin with: The last part if the uri is what determines what we are pointing at. This is a list of the 5 different tag lits:

  • core - the core taglib offers support for variables, flow control, URL management and some misc stuff...
  • xml - includes core functionality as well as flow control and transformations...
  • fmt - internationalization...
  • sql - Support for Structured Query Language
  • functions - supports functionality for string manipulation and other things.

CREATED 2012-12-11 03:11:18.0


UPDATED 2012-12-11 04:39:08.0

The Process...

As stated, a .jsp page runs from a servlet. During execution JSP actually creates a servlet on a servlet engine and runs it. BUT... JSP is created from a simple text file (like all java code). It goes through this process...

  • Translation - the file that contains the jsp code is translated. i.e. made into a Java source file by injecting java code.
  • Compilation - the file is compiled into a java servlet .class file
  • Load - the java servlet is loaded in the container by a class loader
  • Instantiation - the servlet is instantiated into a object of type servlet
  • Initialization - the object is initialized using the init method
  • Service - the instantiated and initialized object is executed to service a client
  • Destruction - taken out of service when no longer needed or the jsp file has changed

If the source file does not change, and the page is requested again, it would be served from memory. If the source file changes and or something happens in the servlet container, like a shutdown, then the servlet is destroyed like all other good servlets are.

CREATED 2012-12-11 05:05:36.0


UPDATED 2012-12-11 05:05:45.0



DBID: db.wam

Page Server: Ruger

©2012 Leistware Data Systems

      Hello anonymous