Welcome to Cheng-chien's Web Site Designed for Santa Monica College Study
Home Assign 02 Assign 03 Assign 04 Assign 05 Final Exam World TimeZones  
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>
	<title>Java Server Page</title>
	<meta name="Description" 
		content="A Simplfied Guide to JavaServer Pages Technology">
	<meta name="Page" content="02">
	<!-- second page uses a stylesheet -->
	<link rel="stylesheet" type="text/css" href="resource/assignment02.css" 
		title="local_formal">
</head>

<body background="images/cloudbg.gif" 
	topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">

<div class="head" style="text-align:right">
	<!-- a graphic to link to a site -->
	<a href="http://java.sun.com/products/jsp/">
	<img border="0" src="images/javalogo52x88.gif" width="52" 
		height="88" vspace="0" hspace="10" align="right" 
		alt="JSP Home"></a><br>
	<big>J</big>AVA<big>S</big>ERVER <big>P</big>AGES<SUP>
	<small>TM</small></SUP><BR>A Simplified Guide
</div>

<!-- main page content -->
<table cellspacing="0" cellpadding="0" border="0" height="19">
	<tr>
	<td bgcolor="#8CAAE7" valign="top">
		<img src="images/crvRt_8CAAE7.gif" width="10" height="19" alt="" border="0"></td>
	<td bgcolor="#8CAAE7" nowrap width="100%">
		<img src="images/ts.gif" width="1" height="1" alt="" border="0">
		<b class="heading">3. JSP Technology: The Next Evolution of Servlets</b></td>
	<td width="175" height="19" background="images/gradient_8CAAE7.gif">
		<img src="images/ts.gif" width="175" height="19" alt="" border="0"></td>
	</tr>
</table>

<P>
JSP technology is a means for creating dynamic Web-based content using 
server-side (middle-tier) processing. JSP simplifies the process of 
creating these dynamic pages by separating the application logic from 
the page design and encapsulating logic in portable, reusable Java 
components.</P>
<P>
JSP technology has evolved from the powerful servlet technology. 
(Servlets are Java technology-based, server-side applications.) JSP 
extends the servlet technology in many ways, making it easier and 
faster to build, deploy, and maintain server-side applications that 
communicate with Web-based clients. The following sections describe 
where JSP technology fits in the Java family of products, how JSP can 
simplify the creation and maintenance of dynamic pages, and how these 
pages fit into more complex, multitier applications.i</P>
<P><B>Overview of the Java APIs</B></P>
<P>
The name Java is attached to many things, so it's worth cutting back 
to fundamentals for a moment and defining where JSP technology fits 
in the Java technology family of products.</P>
<P>
A Java programming environment consists of the Java programming 
language, a Java language compiler (to compile the Java programs), 
and a Java virtual machine (to run the programs). The power of Java 
technology for cross-platform development lies in this model -- the 
compiler creates platform-independent executables (Java bytecode) 
that run in the Java virtual machine, which generates the actual, 
machine-specific instructions to execute.</P>
<P><B>Write Once, Run Anywhere</B></P>
<P>
The underlying design goal driving all past and future Java 
development is articulated in the slogan, Write Once, Run Anywhere. 
The concept behind the technology is that any Java program can run 
on any Java virtual machine - without platform-specific modification. 
Because Java virtual machines are available for almost every platform, 
this is the closest thing possible to a universal programming environment.</P>
<P><B>The Java APIs</B></P>
<P>
The Java programming language consists of classes and interfaces, 
accessible through defined APIs (application programming interfaces), 
distributed in a tree structure of class libraries. The Java core 
classes include the primary APIs. Extensions to the language are 
implemented through Java standard extensions.</P>
<P><B>JavaServer Pages Technology</B></P>
<P>
JSP technology is implemented as a Java API; the JSP API is part of 
the Java 2 Platform, Enterprise Edition (J2EE). Because pages created 
with JSP actually compile into servlets, they build on and extend the 
servlet API as well. Because JSP technology is part of the J2EE platform, 
expect to see more servers and tools supporting this API. For more 
information on the latest version as well as a listing of the Web servers, 
application servers, and tools that support it, 
please go to java.sun.com/products/jsp/.</P>
<P><B>JSP Extends Servlets</B></P>
<P>
In a sense, JSP technology does not provide new core technologies - 
everything that can be done with a JSP page, can also be done by 
writing a servlet. Servlets have access to the same set of Java APIs as 
JSP. Pages created with JSP technology are, in fact, compiled into 
servlets, so they cannot be capable of anything inherently different.</P>
<P>
What JSP pages do, however, is enable a different, more efficient 
development methodology and simplify ongoing maintenance. This is 
because JSP technology truly separates the page design and static 
content from the logic used to generate the dynamic content.</P>
<P><B>Empowering Page Authors</B></P>
<P>
Other methods for creating dynamic content require Web developers (with 
programming expertise) to embed the fixed page design and content into a 
script or a program (such as a CGI program). Average, HTML-literate page 
authors cannot easily edit and manipulate the content of the page without 
being familiar with the scripting language used.</P>
<P>
With JSP technology pages, however, the logic itself is embedded in a 
standard page (HTML or XML). Page authors can use familiar tools to 
create and edit pages, and simply embed calls to the necessary application 
components where needed. All they need to know is how to invoke the logic 
- a programmer can be responsible for building and maintaining the logic 
components.</P>
<P>
From a page author's perspective, the JSP page is a functionally-enhanced 
version of something they already know.</P>
<P><B>Benefits to Development Cycles</B></P>
<P>JavaServer Pages technology enables efficiencies in development and 
maintenance processes alike:</P>

<!-- use the DIV tags with style attribute, change the font color of text 
	and backgound color -->
<div style="{color:#CC6600;font-family:verdana;font-size:12px;background:#FFFFCC;text-align:justify}">
<UL>
<LI>Developers focus on the core components called by the pages. 
	These components may be implemented through 
	JavaBeans<SUP><small>TM</small></SUP> components or custom 
	JSP tag	libraries. Multiple applications can reuse the same 
	components.</LI>
<LI>Page authors can change the look and feel of a dynamic page, 
	embed new content, update copyright information, change 
	product names - all without involving the developer or 
	interfering with the function of the page. Developers do not 
	have to be involved in any routine page maintenance 
	activities unless they involve application logic itself.</LI>
</UL>
</div>

<P>
Not only does this division translate into faster application deployment, 
it makes the ongoing maintenance of these applications much easier by 
dividing the maintenance tasks themselves into content and logic tasks. 
In a sense, JSP technology keeps the code out of the content, and the 
content out of the code. Custom Tag Libraries Distribute Business Logic 
JSP technology supports a unique feature called Custom JSP Tags. Using 
this feature, a developer using the Java language could create a custom 
tag library of commonly-used functions, then distribute the information 
to a wide range of page authors. Instead of being responsible for every 
page's look and feel, the programmer is responsible solely for the 
application logic.</P>
<P>
Custom tag libraries provide developers with an easy way to distribute 
sophisticated application functionality for reuse to a wide range of page 
authors. Because these tags are resolved in the server and not exposed to 
clients, they do not introduce client-side dependencies.</P>
<BR>
<!-- end of page content -->

<!-- links to the previous and next pages -->
<div style="float:right; text-align:right">
<table border="0" cellpadding="0" cellspacing="0">
	<tr>
	<td><a class="textbody" href="assignment03-01.htm">
		<img src="images/arrow_back.gif" border="0" align="right" alt="Previous Page">
		</a></td>
	<td class="textbody"><b>02</b> OF <b>04</b></td>
	<td><a class="textbody" href="assignment03-03.htm">
		<img src="images/arrow_next.gif" border="0" align="right" alt="Next Page">
		</a></td>
	</tr>
</table>
</div>
<a href="#top"><img src="images/top_v1.gif" border="0" alt="Back To Top"></a>

<!-- footer to indicate that it's week 3 -->
<hr>
<center><pre class="textbody">
Web Page Designed By : <i><a href="mailto:chengchien@linkline.com">Cheng-chien Yu</a></i>
Attaendant Class : Santa Monica College - CIS 36H
Due Date : September 29, 2001.
</pre></center>
<hr>

</body>
</html>