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