<s1 title="JSP">

<p>Resin supports Sun's JSP 1.2 specification.  JSP creates an HTML
page from HTML <em>template</em> text and scripting <em>actions</em>.
Resin supports Java and JavaScript as scripting languages for JSP pages.</p>

<example>
<var/&lt;%@ page language=javascript %&gt;
&lt;% var title='Counter' %&gt;/>
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;<var/&lt;%= title %&gt;/>&lt;/title>
&lt;/head&gt;
&lt;body bgcolor='white'&gt;
<var/&lt;jsp:useBean id='counter' class='Counter' scope='application'/&gt;/>
&lt;h1&gt;<var/&lt;%= title %&gt;/>&lt;/h1&gt;

Welcome, visitor <var/&lt;%= counter.hit %&gt;/>!
&lt;/body&gt;&lt;/html&gt;

</example>

<p>JSP supports an equivalent XML syntax.  The XML has the benefit of
consistency with the price of some extra verbosity.</p>

<example>
<var>&lt;jsp:directive.page language=javascript/&gt;
&lt;jsp:scriptlet>var title='Counter' %&lt;/jsp:scriptlet></var>
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;<var>&lt;jsp:expression>title&lt;/jsp:expression></var>
&lt;/head&gt;
&lt;body bgcolor='white'&gt;
<var/&lt;jsp:useBean id='counter' class='Counter' scope='application'/&gt;/>
&lt;h1&gt;<var>&lt;jsp:expression> title &lt;/jsp:expression></var>&lt;/h1&gt;

Welcome, visitor <var>&lt;jsp:expression> counter.hit&lt;/jsp:expression></var>!
&lt;/body&gt;&lt;/html&gt;

</example>

<defun name='Actions' title="Actions">
<p><a href='jsp-actions.xtp'>Actions</a> are the core of JSP.
Actions range from printing the a script expression, to creating and
storing a Java Bean.</p>
</defun>

<defun name='Custom Tag Libraries' title="Custom Tag Libraries">
<p>Resin encourages the creation of <a href='xtp-jsp.xtp'>custom tag
libraries</a>.  Using <a href='xsl.xtp'>XSL</a>, you can create
meaningful tags for your web pages: ct:shopping-cart-summary,
ct:example, ct:sql-query.</p>
</defun>

<defun name='Directives' title="Directives">
<p><a href='jsp-directives.xtp'>Directives</a> control the processing of
an entire page.  Directive examples include setting a scripting
language, setting an error page, including other documents, and
setting a character encoding.</p>
</defun>

<defun name='Variables' title="Variables">
<p>JSP makes implicit <a href='jsp-variables.xtp'>variables</a>
available to the script.  Scripts can use request, response, session, and
application variables.</p>
</defun>

<defun name='Applications' title="Applications">
<p><a href='jsp-applications.xtp'>Applications</a> join JSP pages,
script libraries and Java beans into a self-contained web
application.  Applications are controlled by the <a
href='http-config.xtp'>configuration</a> file.</p>
</defun>

</s1>

