Welcome to the Gumdrop JSP Examples! This collection demonstrates the comprehensive JSP 2.0+ support implemented in Gumdrop's servlet container, including advanced features like JSP property groups, taglib processing, and automatic includes.
Demonstrates: Core JSP syntax elements including page directives, imports, declarations, scriptlets, and expressions.
Features shown:
<%! %>)<% %>)<%= %>)What you'll learn: How Gumdrop parses JSP syntax, generates servlet code, compiles it dynamically, and executes the resulting servlet to handle requests.
Demonstrates: Same functionality as the basic JSP but using XML-compliant JSP syntax (JSPX format) to showcase Gumdrop's dual parser architecture.
Features shown:
<jsp:directive.page/>)<jsp:declaration>)<jsp:scriptlet>)<jsp:expression>)What you'll learn: How Gumdrop's JSPParserFactory automatically detects JSP format and uses either TraditionalJSPParser or XMLJSPParser, both generating identical servlet code from different syntax formats.
Demonstrates: JSP property group enforcement with scripting-invalid
configuration that prevents Java code execution.
Features shown:
/jsp/restricted/*)What you'll learn: How Gumdrop's JSP implementation enforces configuration-based restrictions during parsing, providing administrators control over script usage for security and architectural compliance.
Expected Result: JSPParseException: Scripting is disabled for this JSP page
Demonstrates: Taglib directive processing, TLD resolution, and custom tag recognition (requires JSTL JARs for full functionality).
Features shown:
What you'll learn: How Gumdrop's TaglibRegistry resolves taglib URIs, parses TLD files, and generates appropriate Java code for custom tag instantiation and lifecycle management.
Note: Full JSTL functionality requires adding JSTL JAR files to WEB-INF/lib.
Demonstrates: Automatic content inclusion via JSP property groups with prelude and coda configuration.
Features shown:
What you'll learn: How Gumdrop's JSPPropertyGroupResolver handles multiple property groups, applies preludes and codas cumulatively, and integrates them seamlessly into the generated servlet code.
These examples are configured in web.xml with JSP property groups that demonstrate
different aspects of JSP configuration:
<jsp-config>
<!-- Basic JSP files - no restrictions -->
<jsp-property-group>
<url-pattern>/jsp/*.jsp</url-pattern>
<page-encoding>UTF-8</page-encoding>
<scripting-invalid>false</scripting-invalid>
</jsp-property-group>
<!-- Restricted area - scripting disabled -->
<jsp-property-group>
<url-pattern>/jsp/restricted/*</url-pattern>
<scripting-invalid>true</scripting-invalid>
</jsp-property-group>
<!-- Enhanced area - with preludes and codas -->
<jsp-property-group>
<url-pattern>/jsp/enhanced/*</url-pattern>
<include-prelude>/WEB-INF/includes/header-prelude.jsp</include-prelude>
<include-coda>/WEB-INF/includes/footer-coda.jsp</include-coda>
</jsp-property-group>
</jsp-config>
Gumdrop's JSP implementation provides a complete JSP 2.0+ processing pipeline:
To explore these examples:
The complete JSP implementation source code is available in the src/org/bluezoo/gumdrop/servlet/jsp/
directory, including:
JSPParser interface and implementationsJSPPropertyGroupResolver for configuration processingTaglibRegistry and TldParser for custom tag supportJSPCodeGenerator for servlet code generation← Back to Main Page | Manager Application
Gumdrop JSP Engine - Full JSP 2.0+ Support