Sun Java System Web Server 7.0 Update 1 Developer's Guide to Java Web Applications

Sample Directories

All of the sample applications are arranged in a specific and well-defined directory structure. In general, the top-level directory of a sample application includes the following:

Table 2–1 Sample Directories

Directory  

Contents  

caching

JSP and servlet examples that demonstrate how to cache results of JSP and servlet execution. 

fastcgi

A sample to demonstrate how to use the FastCGI plug-in shipped with the Web Server 7.0 (using PHP).  

i18n

A basic Java EE web application that demonstrates how to dynamically change the display language based on user preference. 

Javamail

A servlet that uses the Javamail API to send an email message. 

JDBC

Java DataBase Connectivity examples are included in the following directories:  

  • blob: A servlet that accesses BLOBs through the JDBC API

  • simple: A basic servlet that accesses an RDBMS through the JDBC API.

  • transactions: A servlet that uses the transaction API with JDBC to control a local transaction

JDBC rowset

Example showing how to use JSR-114 JDBC rowset. 

JNDI

Java Naming and Directory Interface examples are in the following directories: 

  • custom: Demonstrates how to use the custom resource

  • external: Demonstrates how to use the external resource

  • readenv: Demonstrates the environment entries specified in the web.xml file

  • url: A servlet that uses the URL resource facility to access a resource.

JSF 1.2

Example showing how to use Java Server Faces components to quickly build web application user interfaces. 

JSTL

Basic examples that demonstrate usage of the JSP Standard Tag Library. 

NSAPI plugins

NSAPI examples. 

RMI-IIOP

Basic example that demonstrates using a servlet to access a stateless EJBTM using RMI/IIOP running in Web Server.

Security

Examples demonstrating how to secure Java EE web applications through standard authentication mechanisms and access controls. Security examples are included in the following directories: 

  • basic-auth: Demonstrates how to develop, configure, and exercise basic authentication

  • client-cert: Demonstrates how to develop, configure, and exercise client certificate authentication

  • form-auth: Demonstrates how to develop, configure, and exercise form-based authentication

  • jdbcrealm: Demonstrates how to develop, configure, and exercise JDBC realm authentication

Servlet and JSP example 

Servlet 2.5 and JSP 2.1 examples combined into a single web application. 

WS-I 1.1  

Web Services interoperability 1.1 samples.  

websecurity  

Web Services security samples.