JSP Samples

These are the original Tomcat JSP examples. Some of them had to be modified to work in OpenCms. Please note that some of the examples require additional configuration in the OpenCms servlet zone web.xml. Many examples use beans or other classes. The required classes are contained in a JAR called "tomcat-examples.jar" which is part of this module and will be exported to the WEB-INF/lib folder of the OpenCms web application context. After the first installation of this module, you must restart Tomcat / OpenCms to load this new JAR.

This is a collection of samples demonstrates the usage of different parts of the Java Server Pages (JSP) specification.

These examples will only work when these pages are being served by the ServletRunner. They will not work if you are viewing these pages via a "file://..." URL.

To navigate your way through the examples, the following icons will help:
 
Execute the example
Look at the source code for the example
Return to this screen

Tip: For session scoped beans to work, the cookies must be enabled. This can be done using browser options.
 

 

The following examples work with OpenCms, sometimes with small modifications for the include directives. All modified examples are marked with a (*).

Numberguess  Execute Source
Date  Execute Source
Snoop Execute Source
ErrorPage  Execute Source
Carts  Execute Source
Checkbox  Execute Source
Color  Execute Source
Calendar  Execute Source
Include (*)  Execute Source
Plugin  Execute Source
Simple custom tag example Execute Source
Send mail example Execute Source

 

The following two examples use forward() calls which are currently not supported in OpenCms, so they don't work.

Forward  Execute Source
JSP-Servlet-JSP  Execute Source