kprice | 9c922d8 | 2006-08-30 22:07:19 +0000 | [diff] [blame] | 1 | <?xml version="1.0" encoding="utf-8"?>
|
| 2 | <!--Arbortext, Inc., 1988-2005, v.4002-->
|
| 3 | <!DOCTYPE concept PUBLIC "-//OASIS//DTD DITA Concept//EN"
|
| 4 | "concept.dtd">
|
| 5 | <concept id="cpdjsps" xml:lang="en-us">
|
| 6 | <title>JavaServer Pages (JSP) technology</title>
|
| 7 | <prolog><metadata>
|
| 8 | <keywords><indexterm>JavaServer pages<indexterm>overview</indexterm></indexterm>
|
| 9 | <indexterm>dynamic Web content<indexterm>generating</indexterm></indexterm>
|
| 10 | </keywords>
|
| 11 | </metadata></prolog>
|
| 12 | <conbody>
|
| 13 | <p>The JavaServer Pages technology enables you to generate dynamic web content,
|
| 14 | such as HTML, DHTML, XHTML, and XML files, to include in a Web application.
|
| 15 | JSP files are one way to implement server-side dynamic page content. JSP files
|
| 16 | allow a Web server, such as Apache Tomcat, to add content dynamically to your
|
| 17 | HTML pages before they are sent to a requesting browser.</p>
|
| 18 | <p>When you deploy a JSP file to a Web server that provides a servlet engine,
|
| 19 | it is preprocessed into a servlet that runs on the Web server. This is in
|
| 20 | contrast with client-side <tm tmclass="special" tmowner="Sun Microsystems, Inc."
|
| 21 | tmtype="tm" trademark="JavaScript">JavaScript</tm> (within <codeph><SCRIPT></codeph> tags),
|
| 22 | which is run in a browser. A JSP page is ideal for tasks that are better suited
|
| 23 | to execution on the server, such as accessing databases or calling Enterprise <tm
|
| 24 | tmclass="special" tmowner="Sun Microsystems, Inc." tmtype="tm" trademark="Java">Java</tm> beans.</p>
|
| 25 | <p>You can create and edit a JSP file in the HTML editor by adding your own
|
| 26 | text and images using HTML, JSP tagging, or <tm tmclass="special" tmowner="Sun Microsystems, Inc."
|
| 27 | tmtype="tm" trademark="JavaScript">JavaScript</tm>, including <tm tmclass="special"
|
| 28 | tmowner="Sun Microsystems, Inc." tmtype="tm" trademark="Java">Java</tm> source
|
| 29 | code inside of scriptlet tags. Typically, JSP files have the file extension
|
| 30 | .jsp. Additionally, the JSP specification suggests that JSP fragment files
|
| 31 | should have file extension .jspf. If this convention is not followed, the
|
| 32 | JSP validator will treat JSP fragments as regular standalone JSP files, and
|
| 33 | compilation errors might be reported.</p>
|
| 34 | <p>The <cite>Sun Microsystems JSP 1.2 Specification</cite> provides the ability
|
| 35 | to create custom JSP tags. Custom tags simplify complex actions and provide
|
| 36 | developers with greater control over page content. Custom tags are collected
|
| 37 | into a library (taglib). A tag library descriptor file (taglib.tld) is an
|
| 38 | XML document that provides information about the tag library, including the
|
| 39 | taglib short name, library description, and tag descriptions. Refer to the <cite>Sun
|
| 40 | Microsystems JSP 1.2 Specification</cite> for more details.</p>
|
| 41 | <p>To use JSP 1.2 custom taglibs, you can import the tag library .tld and
|
| 42 | .jar files into your project to use them, or associate them as Web Library
|
| 43 | projects. You can also reference a TLD file by using a URI.</p>
|
| 44 | </conbody>
|
| 45 | </concept>
|