caucho
Resin
FAQ
Reference Guide
Demo
Tutorial

Getting Started
Configuration
IDE
Topics
JSP
XML/XSLT

Directives
Actions
Variables
Applications
 JSP

Hessian
Reference Guide
Directives

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

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

Welcome, visitor <%= counter.hit %>!
</body></html>

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

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

Welcome, visitor <jsp:expression> counter.hit</jsp:expression>!
</body></html>

Actions

Actions are the core of JSP. Actions range from printing the a script expression, to creating and storing a Java Bean.

Custom Tag Libraries

Resin encourages the creation of custom tag libraries. Using XSL, you can create meaningful tags for your web pages: ct:shopping-cart-summary, ct:example, ct:sql-query.

Directives

Directives 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.

Variables

JSP makes implicit variables available to the script. Scripts can use request, response, session, and application variables.

Applications

Applications join JSP pages, script libraries and Java beans into a self-contained web application. Applications are controlled by the configuration file.


Hessian
Reference Guide
Directives
Copyright © 1998-2002 Caucho Technology, Inc. All rights reserved.
Resin® is a registered trademark, and HardCoretm and Quercustm are trademarks of Caucho Technology, Inc.