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 | ![]() |
![]() |
Date | ![]() |
![]() |
Snoop | ![]() |
![]() |
ErrorPage | ![]() |
![]() |
Carts | ![]() |
![]() |
Checkbox | ![]() |
![]() |
Color | ![]() |
![]() |
Calendar | ![]() |
![]() |
Include (*) | ![]() |
![]() |
Plugin | ![]() |
![]() |
Simple custom tag example | ![]() |
![]() |
Send mail example | ![]() |
![]() |
The following two examples use forward() calls which are currently not supported in OpenCms, so they don't work. |
||
Forward | ![]() |
![]() |
JSP-Servlet-JSP | ![]() |
![]() |