Submit a Ticket
Support Center » Knowledgebase » JSP - Tomcat » JSP hosting: JSP 2.0 & 1.2 sample code

JSP hosting: JSP 2.0 & 1.2 sample code

JSP hosting: Code Samples

This is a collection of samples demonstrating the usage of different parts of the Java Server Pages (JSP) specification. Both JSP 2.0 and JSP 1.2 examples are presented below.

These examples will only work when these pages are being served by a servlet engine - these samples will work on our JSP hosting plans and you can use them to get familiar with the Tomcat hosting and JSP hosting platform.  These samples will not work if you are viewing these pages via a "file://..." URL.

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

JSP 2.0 Examples
Expression Language
Basic ArithmeticExecuteSource
Basic ComparisonsExecuteSource
Implicit ObjectsExecuteSource

SimpleTag Handlers and JSP Fragments
Hello World TagExecuteSource
Repeat TagExecuteSource
Book ExampleExecuteSource

Tag Files
Hello World Tag FileExecuteSource
Panel Tag FileExecuteSource
Display Products ExampleExecuteSource

New JSP XML Syntax (.jspx)
XHTML Basic ExampleExecuteSource
SVG (Scalable Vector Graphics)ExecuteSource

Other JSP 2.0 Features
<jsp:attribute> and <jsp:body>ExecuteSource
Shuffle ExampleExecuteSource
Attributes With Dynamic NamesExecuteSource
JSP ConfigurationExecuteSource

JSP 1.2 Examples
Numberguess ExecuteSource
Date ExecuteSource
ErrorPage ExecuteSource
Carts ExecuteSource
Checkbox ExecuteSource
Color ExecuteSource
Calendar ExecuteSource
Include ExecuteSource
Forward ExecuteSource
Plugin ExecuteSource
JSP-Servlet-JSP ExecuteSource
Custom tag exampleExecuteSource
XML syntax exampleExecuteSource

Tag Plugins
If   Execute   Source
ForEach   Execute   Source
Choose   Execute   Source

 This answer was helpful  This answer was not helpful