Apache JSTL dependency aggregation module for Eclipse Jetty web applications
npx @tessl/cli install tessl/maven-org-eclipse-jetty--apache-jstl@11.0.0A dependency aggregation module for Eclipse Jetty that bundles Apache JSTL (JavaServer Pages Standard Tag Library) dependencies, enabling JSP tag library functionality in Jetty-based web applications. This module provides a JAR packaging solution for JSTL integration that is compatible with Jetty's modular architecture.
pom.xml dependencies<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>apache-jstl</artifactId>
<version>11.0.0</version>
</dependency>Enable JSTL support in Jetty by activating the module:
java -jar jetty-start.jar --module=apache-jstlUse JSTL tags in JSP pages by declaring the tag library:
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<!-- Example: URL generation with parameters -->
<c:url value="/ref.jsp" var="refUrl">
<c:param name="id" value="123"/>
</c:url>
<!-- Example: Exception handling -->
<c:catch var="catchException">
<fmt:parseNumber var="parsedNum" value="invalid_number" />
</c:catch>
<c:if test="${catchException != null}">
Error occurred: ${catchException.message}
</c:if>This module follows Jetty's dependency aggregation pattern:
The module addresses Maven Dependency plugin limitations by providing JAR packaging for what is essentially a dependency collection, enabling Jetty's modular system to properly copy and include JSTL libraries.
Provides core JSTL functionality including conditionals, loops, URL manipulation, and exception handling through the http://java.sun.com/jsp/jstl/core tag library.
// JSP Tag Library URI
String CORE_TAGLIB_URI = "http://java.sun.com/jsp/jstl/core";
// Key tags available:
// <c:url> - URL generation and encoding
// <c:param> - URL parameter addition
// <c:catch> - Exception handling
// <c:if> - Conditional processing
// <c:set> - Variable assignment
// <c:out> - Output with escapingProvides internationalization and formatting capabilities through the http://java.sun.com/jsp/jstl/fmt tag library for number, date, and message formatting.
// JSP Tag Library URI
String FMT_TAGLIB_URI = "http://java.sun.com/jsp/jstl/fmt";
// Key tags available:
// <fmt:parseNumber> - Number parsing with locale support
// <fmt:formatNumber> - Number formatting
// <fmt:parseDate> - Date parsing
// <fmt:formatDate> - Date formatting
// <fmt:message> - Internationalized messagesConfiguration utilities for integrating JSTL with Jetty WebAppContext, including container include patterns and temporary directory setup.
public class JspConfig {
/**
* Initialize WebAppContext for JSP and JSTL processing.
*
* @param context WebAppContext to configure
* @param baseUri Base URI for the web application
* @param scratchDir Temporary directory for JSP compilation
*/
public static void init(WebAppContext context, URI baseUri, File scratchDir);
}This module aggregates the following external dependencies:
// Core Jetty types for configuration
class WebAppContext {
void setAttribute(String name, Object value);
void setWar(String war);
void setResourceBase(String resourceBase);
}
// Standard Java types for configuration
class URI {
String toASCIIString();
}
class File {
// Standard file operations
}