or run

npx @tessl/cli init
Log in

Version

Tile

Overview

Evals

Files

docs

index.mdjetty-integration.mdjstl-core.mdjstl-formatting.md
tile.json

tessl/maven-org-eclipse-jetty--apache-jstl

Apache JSTL dependency aggregation module for Eclipse Jetty web applications

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
mavenpkg:maven/org.eclipse.jetty/apache-jstl@11.0.x

To install, run

npx @tessl/cli install tessl/maven-org-eclipse-jetty--apache-jstl@11.0.0

index.mddocs/

Apache JSTL Module

A 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.

Package Information

  • Package Name: apache-jstl
  • Package Type: Maven
  • Group ID: org.eclipse.jetty
  • Language: Java
  • Installation: Include in Maven pom.xml dependencies

Maven Dependency

<dependency>
    <groupId>org.eclipse.jetty</groupId>
    <artifactId>apache-jstl</artifactId>
    <version>11.0.0</version>
</dependency>

Basic Usage

Jetty Module Activation

Enable JSTL support in Jetty by activating the module:

java -jar jetty-start.jar --module=apache-jstl

JSP Page Integration

Use 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>

Architecture

This module follows Jetty's dependency aggregation pattern:

  • JAR Wrapper: Packages external JSTL dependencies into a single JAR for Maven compatibility
  • Module Integration: Provides Jetty module descriptor for seamless integration
  • Container JAR Pattern: Configures container include patterns for proper classpath loading
  • Test Infrastructure: Includes validation tests for JSTL functionality

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.

Capabilities

JSTL Core Tag Library

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 escaping

JSTL Core Tags

JSTL Formatting Tag Library

Provides 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 messages

JSTL Formatting

Jetty Integration Utilities

Configuration 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);
}

Jetty Integration

Bundled Dependencies

This module aggregates the following external dependencies:

  • jakarta.servlet.jsp.jstl-api: JSTL API specifications
  • taglibs-standard: Apache JSTL implementation (Morpher Jasper taglibs-standard)

Types

// 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
}