Fact-checked by Grok 2 weeks ago

Jakarta Server Pages

Jakarta Server Pages (JSP) is a server-side technology within the platform that enables developers to create dynamically generated web pages based on , XML, or other document types by mixing static template content with dynamic elements such as code, custom tags, and expressions. It functions as a template engine for web applications, allowing the embedding of logic directly into markup to produce data-driven content, and is built on top of Jakarta Servlets for handling HTTP requests and responses. JSP pages are translated by a container into servlet classes at runtime or deployment time, which then execute to generate the final output sent to the client. Originally known as JavaServer Pages, the technology was developed by and first released in 1999 as part of the platform to simplify development by separating presentation from . In September 2017, Oracle announced the transfer of Java EE stewardship to the to foster open-source innovation, leading to the rebranding of the platform as Jakarta EE. This transition culminated in the renaming of JavaServer Pages to Jakarta Server Pages, with the key namespace change from javax.* to jakarta.* implemented in Jakarta EE 9, released on December 8, 2020. The current version, Jakarta Server Pages 4.0, was released in April 2024, enhancing compatibility with Jakarta EE 11 features. Key features of Jakarta Server Pages include standard directives for page configuration (e.g., <%@ page %>), actions for common tasks like bean instantiation (<jsp:useBean>), scripting elements for embedding Java code (declarations, scriptlets, and expressions), and a tag extension mechanism for creating reusable custom tags. It also integrates the Expression Language (EL) for concise data access and supports role separation between page authors and Java programmers, promoting component reuse through and tag libraries. These elements provide platform independence, strong tooling support, and scalability for enterprise web applications, making JSP a foundational technology for server-side rendering in Java ecosystems.

Introduction and History

Overview

Jakarta Server Pages (JSP) is a server-side scripting technology defined as a template engine for web applications within the Jakarta EE platform, enabling the mixing of static textual content—such as HTML or XML—with dynamic elements including Java code snippets and custom tags to produce dynamically generated web pages. This approach facilitates the creation of content like HTML, XHTML, XML, and other document types by integrating server-side logic directly into markup templates. The primary purposes of JSP are to simplify development by embedding Java-based logic within markup, thereby supporting dynamic features such as form handling, database connectivity, and user session management without requiring developers to manage the full complexity of servlet programming. As a core component of the web tier, JSP enables server-side rendering of web pages, complementing servlets as the underlying execution model while allowing extensions via tag libraries for reusable functionality. In its basic workflow, a JSP page is compiled into a servlet—either at upon first request or pre-compiled during the build —and executed by the to generate the appropriate HTTP response, blending static and dynamic content seamlessly. As of 2025, JSP continues to be an active technology in 11, with the JSP 4.0 specification serving as the current standard, released on April 9, 2024, and incorporating alignments with platform-wide improvements in and security, such as support for Java SE 17 and the removal of legacy SecurityManager dependencies.

Development Timeline

Jakarta Server Pages (JSP) originated in 1999 under as an extension to servlets, drawing inspiration from Microsoft's (ASP) to enable dynamic web content generation through embedded code in HTML-like templates. Released as JSP 1.0 in June 1999, it was designed to simplify by separating presentation logic from , building directly on the servlet foundation established earlier in the decade. This initial version focused on basic scripting elements like scriptlets and expressions, marking JSP's integration into the emerging (J2EE) ecosystem. The technology evolved rapidly through the early 2000s via the Java Community Process (JCP). JSP 1.1 arrived in December 1999 as part of J2EE 1.2, introducing support for tag libraries to promote reusable components and reduce reliance on inline Java code. In September 2001, JSP 1.2 was released with J2EE 1.3, enhancing tag library validation and adding normative XML syntax for better interoperability, while laying groundwork for expression language concepts through integration with the JSP Standard Tag Library (JSTL) 1.0. JSP 2.0 followed in November 2003 under J2EE 1.4, introducing a simplified Expression Language (EL) for data access without full scripting and tag files for easier custom tag creation, significantly improving developer productivity. JSP 2.1, released in May 2006 with Java EE 5, unified the EL with JavaServer Faces (JSF), enabling deferred expressions and closer alignment between JSP and other enterprise technologies. Subsequent maintenance releases refined JSP under Oracle's stewardship after its 2010 acquisition of Sun Microsystems, which had announced the deal in 2009. JSP 2.2 emerged in December 2009 alongside Java EE 6, bolstering EL integration with Servlet 3.0 features like asynchronous processing. By May 2013, JSP 2.3 was finalized in Java EE 7, incorporating web fragments for modular deployment and aligning with Servlet 3.1's pluggable features, further embedding JSP into standardized Java EE platforms. In 2017, Oracle transferred Java EE stewardship to the Eclipse Foundation, rebranding it as Jakarta EE to resolve trademark issues and foster open-source community governance. This shift emphasized collaborative development, with JSP transitioning to the jakarta.* namespace. JSP 3.0 debuted in November 2020 as part of Jakarta EE 9, primarily updating package names from javax.* to jakarta.* for compatibility and removing deprecated elements. Building on this, JSP 3.1 was released in May 2022 with Jakarta EE 10, adding minor enhancements for Servlet 6.0 alignment and improved modularity to support cloud-native deployments. The latest milestone, JSP 4.0, arrived in April 2024 as part of 11, primarily focusing on the removal of deprecated elements, enhancements to error handling for compatibility with 6.1, and minor clarifications. The full 11 platform, incorporating JSP 4.0, was released on June 26, 2025. Under , these updates have driven community-led innovations, integrating JSP into broader standards for and cloud adaptability while maintaining with legacy Java EE applications.

Core Architecture

Integration with Servlets

Jakarta Server Pages (JSP) serves as an extension of the Servlet API, allowing developers to create dynamic by embedding code within HTML-like templates. Each JSP page is translated by the JSP container into a servlet class that implements the HttpJspPage interface, which extends the JspPage interface and ultimately the Servlet interface from the Servlet API. This translation ensures that JSP pages inherit the full lifecycle and capabilities of servlets, including initialization, service, and destruction phases, while providing a more declarative syntax for presentation-oriented tasks. In the request-response cycle, a client HTTP request to a JSP page triggers the servlet container to invoke the generated servlet's _jspService(HttpServletRequest request, HttpServletResponse response) , which is analogous to the service() in standard servlets but tailored for JSP processing. This handles the incoming request by executing the embedded JSP elements, such as scriptlets and tags, to generate dynamic output streamed to the response. Depending on the HTTP (e.g., GET or ), the processing implicitly aligns with servlet behaviors like doGet() or doPost(), ensuring seamless integration within the web application's request dispatching mechanism. JSP shares the core contextual objects from the Servlet API, including HttpServletRequest for accessing request parameters and attributes, HttpServletResponse for building the response, and ServletContext for application-wide configuration and resource management. These objects enable JSP pages to participate in session management via HttpSession and to interact with the broader environment, such as forwarding requests or including other resources. To facilitate this, JSP provides implicit objects—predefined variables automatically available in scriptlets, expressions, and the Expression Language (EL)—such as request (an instance of HttpServletRequest), response (an instance of HttpServletResponse), session (an instance of HttpSession), out (a JspWriter for output), and application (an instance of ServletContext). These implicit objects allow JSP developers to perform servlet-like operations without explicit declaration, bridging the gap between presentation code and servlet functionality. While pure servlets are typically used for handling controller logic, such as request routing and business processing, JSP emphasizes presentation logic through its template-based structure, making it ideal for generating views in Model-View-Controller (MVC) architectures. In hybrid MVC implementations, servlets often act as controllers to prepare data models and forward to JSP pages for rendering, promoting by keeping complex logic out of the view layer. This division enhances maintainability and reusability, as JSP focuses on dynamic HTML generation while leveraging the Servlet API's robustness for core web handling.

Page Compilation and Lifecycle

Jakarta Server Pages (JSP) undergo a two-phase lifecycle managed by the JSP container: translation and execution. During the translation phase, the container parses the JSP page, validates its syntactic correctness, and generates a corresponding Java servlet source file. Directives such as <%@ page %> are translated into import statements and class-level configurations in the generated servlet, while scriptlets (<% %>) are incorporated as method bodies within the servlet class. The resulting Java source is then compiled using a Java compiler, such as javac, into a bytecode .class file that extends HttpJspBase, a subclass of HttpServlet. In JSP 4.0, compilation rules were tightened, such as limiting the pageEncoding directive to one per file, while maintaining the core process. This process ensures that JSP pages are transformed into efficient, executable servlets capable of handling HTTP requests. JSP compilation can occur at runtime or through pre-compilation. In runtime compilation, containers like perform on-the-fly translation and compilation upon the first request to a JSP page, enabling dynamic development but introducing potential delays. Pre-compilation, conversely, allows developers to translate and compile JSP pages during the build process using tools such as Apache Ant's jspc task or plugins, facilitating faster deployment by including the .class files in the web application archive. This approach is particularly useful for production environments where startup time is critical. Once compiled, the JSP servlet follows a lifecycle that extends the standard servlet lifecycle with JSP-specific methods. The jspInit() method is invoked once during initialization to perform setup tasks, such as allocating resources. For each incoming request, the _jspService() method processes the HTTP request and generates the response by executing the embedded page content. Upon removal from service, the jspDestroy() method is called to release resources and clean up. Containers cache these compiled .class files to avoid redundant translation, enhancing subsequent request performance. Error handling is integral to both phases of the JSP lifecycle. Syntax errors, such as malformed directives or unbalanced tags, are detected during the translation phase, resulting in a compilation failure and typically an HTTP 500 error response. At runtime, uncaught exceptions in the _jspService() method can be directed to a designated error page via the errorPage attribute in the page directive, allowing graceful handling without exposing internal details to users. Performance considerations revolve around mitigating the overhead of while maintaining flexibility. The initial request to an uncompiled JSP incurs and latency, which can be amortized through caching of the resulting . Since JSP 2.0, containers like Tomcat's 2 engine have used efficient compilers such as JDT to compile the generated Java source code into , improving performance over traditional . In development modes, many containers enable automatic reloading of modified JSP pages, recompiling them on demand to support iterative coding without manual restarts. Pre-compilation strategies further optimize production deployments by eliminating runtime overhead entirely.

Syntax Elements

Directives and Declarations

Directives in Jakarta Server Pages (JSP) provide page-level instructions that configure the compilation and runtime behavior of a JSP without generating any output to the response. These directives are processed during the translation phase, influencing how the JSP container generates the corresponding servlet class. There are three primary directives: , include, and taglib. The page directive specifies attributes that apply to the entire JSP page, such as import statements, content type, error handling, and session management. Its syntax is <%@ page attribute="value" %>, where multiple attributes can be set in a single directive or across multiple instances, provided they remain consistent except for import and . Key attributes include contentType, which defines the type and (e.g., <%@ page contentType="text/html; charset=UTF-8" %>), errorPage for specifying an error-handling page (e.g., <%@ page errorPage="/error.jsp" %>), and session to enable or disable implicit session access (default is true, e.g., <%@ page session="false" %>). The isThreadSafe attribute, if set to false, instructs the to serialize requests to the page, ensuring for non-reentrant code. The include directive enables static of content from another at translation time, merging the included 's content into the JSP before . This is useful for reusable elements like headers or footers that do not change dynamically. Its syntax is <%@ include file="relativeURL" %>, where the file attribute specifies a relative path to the included , such as <%@ include file="header.jsp" %>. Unlike runtime includes, this directive performs textual , allowing the included to contain JSP syntax that is parsed by the . The taglib directive declares a tag library for use in the page, enabling custom or standard tags without embedding raw Java code. Its syntax is <%@ taglib uri="tagLibraryURI" prefix="tagPrefix" %> or <%@ taglib tagdir="tagDir" prefix="tagPrefix" %> for tag files in a directory. The uri attribute identifies the library (e.g., <%@ taglib uri="jakarta.tags.core" prefix="c" %> for the core JSTL library), while prefix defines the namespace for tag usage (e.g., <c:out>). Multiple taglib directives can appear in a page, but prefixes must not conflict. Declarations, using the syntax <%! declaration(s) %>, allow the definition of class-level variables and s in the generated servlet, placed outside the _jspService method for across the entire lifecycle. For example, <%! private int counter = 0; %> declares an initialized once per servlet . These differ from scriptlets (<% code %>), which execute within the _jspService method and have local per request, as declarations create shared that persists beyond individual requests. Best practices recommend minimizing declarations to avoid thread-safety issues, as instance variables are shared across concurrent requests in multi-threaded containers; instead, use local variables in scriptlets or request/session attributes for state management. Overuse of declarations can lead to race conditions, so they should be limited to truly class-level needs, such as utility methods, while favoring and custom tags for most logic to enhance maintainability and safety. The isThreadSafe="false" attribute in the page directive can mitigate risks for pages with shared state, but redesigning to eliminate it is preferable.

Scriptlets, Expressions, and Basic Tags

Scriptlets in Jakarta Server Pages (JSP) enable the embedding of code fragments directly within the page markup using the syntax <% Java code %>. These fragments are executed at request-processing time and are translated by the JSP container into executable statements within the _jspService method of the generated servlet class, allowing integration with the servlet lifecycle. Scriptlets are particularly suited for procedural elements such as conditional statements, loops, or interactions with and request objects, providing a way to inject dynamic logic into the template text. For example, a scriptlet can implement basic user authentication by checking request parameters against a validation :
jsp
<%
String username = request.getParameter("username");
String password = request.getParameter("password");
boolean isAuthenticated = (username != null && password != null && validateUser(username, password));
if (isAuthenticated) {
%>
<h1>Welcome, <%= username %>!</h1>
<%
} else {
%>
<p>Access denied. Please log in again.</p>
<%
}
%>
Here, the validateUser method would be a predefined utility for credential checking, and the scriptlet controls the flow of HTML output based on the result. However, extensive use of scriptlets often results in tightly coupled code that mixes presentation and , leading to poor and difficulties in team or reuse. As a result, they are discouraged in favor of tag-based alternatives in contemporary JSP . Expressions provide a concise mechanism for evaluating and outputting the result of a expression using the syntax <%= expression %>. At request time, the evaluates the expression, coerces it to a representation, and inserts it into the response via an out.print() call in the translated servlet code. This is commonly used for simple data display, such as rendering dynamic values from request parameters or objects, without the need for full statements. For instance, <%= new java.util.Date() %> outputs the current directly in the page. Expressions must resolve to a single value and cannot include semicolons or complex blocks, limiting them to straightforward computations or property access. While effective for quick outputs, over-reliance on expressions can embed too much Java-specific code into the markup, exacerbating the same maintenance issues as scriptlets by blurring the separation between view and controller layers. Basic tags, or standard actions, offer structured ways to perform common operations without raw Java embedding, with output often managed through the implicit out object (a JspWriter instance available in the page context). A key example is the <jsp:include> action, which dynamically incorporates the content of another JSP page or servlet at request time, unlike static includes processed at translation time. Its syntax is <jsp:include page="relativeURLspec" flush="true" />, where the flush attribute controls whether the buffer is flushed before inclusion to ensure proper ordering. This tag translates to Java code that invokes RequestDispatcher.include(), enabling modular page composition while maintaining request-scoped execution. In XML-compliant JSP documents, the <jsp:output> tag further refines output control by specifying attributes like omit-xml-declaration or doctype-root-element, ensuring compliant rendering of the response. Although basic tags promote cleaner code than scriptlets, they still require careful scoping awareness, and modern practices recommend evolving toward expression language and custom tags to minimize direct code exposure and enhance overall page readability.

Expression Language

The Expression Language (EL) in Jakarta Server Pages (JSP) serves as a script-free for page authors to access and manipulate data from , objects, and scoped variables without embedding code directly into the page. It enables querying properties and invoking methods on objects stored in the page, request, session, or application scopes, promoting separation of presentation and business logic while enhancing security by avoiding direct scriptlet usage. EL expressions are embedded in JSP pages using the syntax ${expression} for immediate during page rendering or #{expression} for deferred evaluation, such as within custom tags. Property access uses dot notation (e.g., ${user.name} to retrieve the name property of a user ) or bracket notation (e.g., ${user['name']} for dynamic keys), supporting nested references like ${sessionScope.user.address.city} to navigate scopes explicitly. The language includes arithmetic operators (+, -, *, /, %), logical operators (&&, ||, !), and relational operators (==, !=, <, >, <=, >=), allowing complex expressions such as ${param.age > 18 ? '[Adult](/page/Adult)' : '[Minor](/page/Minor)'} for conditional logic. In the JSP context, EL provides implicit objects for convenient access to request data, including param for URL parameters (e.g., ${param.username}), header for HTTP headers (e.g., ${header['User-Agent']}), cookie for cookies (e.g., ${cookie.JSESSIONID.value}), and pageContext for servlet-related information (e.g., ${pageContext.request.contextPath}). These objects integrate seamlessly with scoped variables, enabling direct binding to form elements and dynamic content generation. The has evolved significantly across versions to support modern needs. The Unified EL 3.0, standardized in 2013 under JSR 341 as part of Java EE 7, introduced lambda expressions (e.g., ${list.stream().filter(x -> x > 10).collect()}), collection operations like empty checks and size, and static imports for fields and methods (e.g., ${java.lang.Math.PI}). It also enhanced type coercion for automatic conversion between primitives, objects, and strings. In Jakarta Server Pages 4.0, aligned with EL 6.0 under 11 (released June 2025), further refinements to coercion rules improved compatibility with Java generics and streamlined static import handling in JSP contexts, while removing deprecated features from prior versions. Example Usage in a Form Consider a JSP page that displays and validates user input from a stored in the request . The form pre-populates fields with bean values and checks for validation errors using :
jsp
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="jakarta.tags.core" prefix="c" %>
<jsp:useBean id="user" class="com.example.User" scope="request"/>

<form action="process.jsp" method="post">
    <label for="name">Name:</label>
    <input type="text" id="name" name="name" value="${user.name}" required>
    <c:if test="${not empty user.errorMessage}">
        <span style="color: red;">${user.errorMessage}</span>
    </c:if><br>

    <label for="email">Email:</label>
    <input type="email" id="email" name="email" value="${[user](/page/User).email}" required>
    <c:if test="${[user](/page/User).emailValid == false}">
        <span style="color: red;">Invalid email format.</span>
    </c:if><br>

    <input type="submit" value="Submit">
</form>

<p>Welcome, ${[user](/page/User).name != [null](/page/Null) ? [user](/page/User).name : 'Guest'}!</p>
In this snippet, EL accesses bean properties for display (${[user](/page/User).name}), evaluates conditions for validation feedback (e.g., ${[user](/page/User).emailValid == false}), and handles null checks with ternary operators, all without scriptlets. The [User](/page/User) bean might include validation logic in its setter methods or a separate processor.

Tag Systems and Extensions

Standard Actions

Standard actions in Jakarta Server Pages (JSP) are predefined XML with the jsp prefix that provide built-in functionality for common tasks such as instantiating , manipulating their properties, including content dynamically, and forwarding requests, without requiring custom tag development. These actions are evaluated at request time and integrate seamlessly with the JSP page lifecycle, promoting a declarative approach to generation. The <jsp:useBean> action locates an existing JavaBean instance in a specified scope or creates a new one if none exists, associating it with a scripting or Expression Language (EL) variable for use within the page. It requires an id attribute for the variable name, a scope attribute (options: page, request, session, or application), and either a class attribute specifying the fully qualified class name or a beanName with an optional type. If the bean is newly instantiated, any body content of the action is executed; otherwise, it is skipped. For example:
<jsp:useBean id="user" class="com.example.User" scope="session" />
This action supports EL for variable access, allowing properties to be referenced as ${user.property} later in the page. The <jsp:setProperty> and <jsp:getProperty> actions handle property manipulation for beans created or referenced via <jsp:useBean>. The <jsp:setProperty> action sets a bean's property value, either from a literal value attribute, a request parameter via param, or automatically from all matching request parameters using property="*"; it requires a name attribute matching the bean's id. For instance:
<jsp:setProperty name="user" property="*" />
This auto-binding feature reduces scripting boilerplate by mapping HTTP parameters directly to setters, with handled according to JSP rules. Conversely, <jsp:getProperty> retrieves a and writes it to the output stream as a string, using the bean's toString() method if the property is an object; it also requires name and property attributes and has no body. An example is:
<jsp:getProperty name="user" property="name" />
These actions enforce by encapsulating data access within declarative tags, minimizing direct code in the markup. For content management, the <jsp:include> action dynamically inserts the output of another resource (such as a or servlet) at request time, preserving the calling 's context and allowing parameters via nested <jsp:param> elements. It requires a page attribute with a relative and an optional flush attribute to buffer the output before inclusion. Example usage:
<jsp:include page="footer.jsp" flush="true">
    <jsp:param name="version" value="1.0" />
</jsp:include>
In contrast, the transfers control to another , terminating the current page's execution and forwarding the original request with its attributes intact; it supports parameters similarly but does not resume processing in the caller. Its syntax is:
<jsp:forward page="error.jsp" />
These inclusion and forwarding actions enable modular page composition and error handling without full page reloads. Additional standard actions include <jsp:plugin>, which generates browser-specific (<object> or <embed>) to embed applets or via plugins (deprecated in JSP 3.1 and removed in JSP 4.0 in favor of modern alternatives like ); <jsp:element>, which dynamically creates an XML element with a request-time name attribute and optional body content for structured output; and <jsp:text>, which outputs literal template text in JSP documents, escaping XML characters to prevent parsing issues. Examples:
<jsp:plugin type="applet" code="MyApplet.class" height="200" width="300" />
<jsp:element name="div">
    <jsp:attribute name="class">header</jsp:attribute>
    <jsp:body>Dynamic content</jsp:body>
</jsp:element>
<jsp:text>&lt;p&gt;Escaped text&lt;/p&gt;</jsp:text>
Overall, standard actions encourage a model-view separation by handling object lifecycle and flow control declaratively, reducing reliance on scriptlets and improving in JSP-based applications. As of JSP 4.0 (released 2024 with 11), certain legacy actions like <jsp:plugin> have been removed to align with modern web standards.

Custom Tag Libraries

Custom tag libraries in Jakarta Server Pages (JSP) enable developers to create reusable, encapsulated components that extend the core functionality of JSP pages, allowing for the abstraction of complex logic into simple, declarative tags. These libraries build upon the standard actions provided by JSP, offering a mechanism to define custom actions that can be invoked like elements within JSP files. By implementing custom tags, developers can promote code reusability, maintainability, and separation of presentation from in web applications. To create a custom tag, developers typically implement tag handler classes that adhere to specific interfaces defined in the JSP . The primary interfaces are Tag, SimpleTag, and BodyTag, each providing different levels of control over tag processing. The Tag interface serves as the base for classic tag handlers, requiring implementations of methods such as setPageContext, setParent, and lifecycle hooks. The SimpleTag interface, introduced for simpler implementations, consolidates processing into a single doTag method, making it suitable for tags without complex body iteration. The BodyTag interface extends Tag to support manipulation of nested body content through additional methods like doInitBody and doAfterBody. Tag handlers are usually implemented by extending abstract classes like TagSupport or SimpleTagSupport to simplify . The lifecycle of a custom tag handler is managed by the JSP container, which instantiates the handler and invokes its methods in sequence. Upon encountering a custom tag in a JSP page, the container calls doStartTag (for Tag and BodyTag implementations), which can return SKIP_BODY to bypass body evaluation or EVAL_BODY_INCLUDE to process it. After body content evaluation (if applicable), doAfterBody may be called for iterative processing in BodyTag handlers. Finally, doEndTag is invoked, allowing post-processing and returning EVAL_PAGE to continue page execution or SKIP_PAGE to halt it. For SimpleTag handlers, the doTag method handles the entire lifecycle, including body content via JspFragment.invoke. This structured approach ensures predictable behavior and integration with the JSP compilation process. An alternative to full Java-based tag handlers is the use of tag files, which provide a simpler way to define custom tags without requiring extensive code. Introduced in JSP 2.0, tag files are JSP fragments with a .tag extension, typically stored in the /WEB-INF/tags/ directory of a . They are declared using a <%@ tag %> directive and can include attributes, body content, and even nested tags, functioning much like reusable JSP snippets. Tag files are particularly useful for components that involve mixing markup and simple scripting, as they compile to tag handler classes at deployment time. To reference a tag file, the taglib directive uses a tagdir attribute pointing to the directory, rather than a . Custom tags support the passing of parameters through attributes and the processing of nested body content. Attributes are declared in the tag library descriptor (TLD) with details like name, type, and whether they support runtime expressions (rtexprvalue). In the tag handler, attributes are accessed via setter methods (e.g., setName([String](/page/String) name)), automatically generated based on TLD definitions. Body content can be categorized by type—JSP for evaluable content, scriptless for non-scripted markup, or tagdependent for raw treatment—and is accessible via BodyContent in BodyTag or JspFragment in SimpleTag handlers. This allows tags to iterate over, modify, or conditionally include body elements, enhancing flexibility for dynamic content generation. Deployment of custom tag libraries involves packaging them with a Tag Library Descriptor (TLD), an XML file that defines the library's structure, including the URI, tag names, handler classes, and attributes. TLD files are placed in /WEB-INF/ or /META-INF/ (for JAR-packaged libraries) and use a schema like http://jakarta.ee/xml/ns/jakartaee for validation. The taglib directive in JSP pages maps a unique URI (e.g., http://example.com/mytags) to the library via <%@ taglib uri="..." prefix="..." %>, enabling tag usage with the specified prefix. For tag files, no TLD is required if using tagdir, though optional TLDs can enhance documentation and validation. This mapping ensures the container locates and compiles the tags correctly during page translation. A representative example is a custom "hello" tag that greets a user by name, accepting an attribute for the name and optionally including body content as a personalized message. The tag handler class, HelloTag, extends SimpleTagSupport:
java
import jakarta.servlet.jsp.tagext.SimpleTagSupport;
import jakarta.servlet.jsp.JspException;
import jakarta.servlet.jsp.JspContext;
import java.io.IOException;

public class HelloTag extends SimpleTagSupport {
    private String name;

    public void setName(String name) {
        this.name = name;
    }

    public void doTag() throws JspException, IOException {
        JspContext context = getJspContext();
        context.getOut().write("<p>Hello, " + (name != null ? name : "World") + "!</p>");
        JspFragment body = getJspBody();
        if (body != null) {
            body.invoke(context.getOut());
        }
    }
}
The corresponding TLD (hello.tld) in /WEB-INF/ defines the tag:
xml
<?xml version="1.0" encoding="UTF-8"?>
<taglib xmlns="https://jakarta.ee/xml/ns/jakartaee"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee
                            https://jakarta.ee/xml/ns/jakartaee/tld_3_0.xsd"
        version="3.0">
    <tlib-version>1.0</tlib-version>
    <short-name>hello</short-name>
    <uri>http://example.com/hello</uri>
    <tag>
        <name>hello</name>
        <tag-class>HelloTag</tag-class>
        <body-content>scriptless</body-content>
        <attribute>
            <name>name</name>
            <required>false</required>
            <rtexprvalue>true</rtexprvalue>
        </attribute>
    </tag>
</taglib>
In a JSP page, the tag is used after the taglib directive:
jsp
<%@ taglib uri="http://example.com/hello" prefix="h" %>
<h:hello name="User"> Welcome to Jakarta Server Pages!</h:hello>
This outputs: <p>Hello, User!</p>Welcome to Jakarta Server Pages!, demonstrating attribute passing and .

Jakarta Standard Tag Library

The Jakarta Standard Tag Library (JSTL) is a collection of standard tag libraries that extend Jakarta Server Pages (JSP) by providing reusable tags for common tasks, such as flow control, data formatting, , XML processing, and database interactions. It promotes separation of from presentation by encapsulating functionality in tag form, reducing reliance on scriptlets. JSTL has been part of the platform since its inception as JavaServer Pages Standard Tag Library under Java EE, with version 3.0 aligned to Jakarta EE 10 and minor updates in subsequent releases up to 3.0.2 in August 2024 for compatibility with Jakarta EE 11. The core library, accessed via the c prefix (URI: jakarta.tags.core), offers tags for basic control structures and output handling. Key tags include <c:if> for conditional execution, <c:choose> with <c:when> and <c:otherwise> for multi-way branching, <c:forEach> for iterating over collections or arrays, <c:out> for safe output escaping, and <c:redirect> for HTTP redirects. For example, to loop over a list of items and display them:
<c:forEach var="item" items="${productList}">
    <p>${item.name} - $${item.price}</p>
</c:forEach>
This tag set handles structural tasks efficiently, supporting Expression Language (EL) expressions for dynamic values. The formatting library, using the fmt prefix (URI: jakarta.tags.fmt), focuses on locale-sensitive data presentation and . It includes <fmt:formatNumber> for , , or number formatting, <fmt:formatDate> for and time rendering, and <fmt:message> for retrieving localized messages from resource bundles. An example for formatting a :
<fmt:formatDate value="${now}" pattern="yyyy-MM-dd" />
The <fmt:setLocale> and <fmt:bundle> tags enable context-specific localization, ensuring applications adapt to user preferences without hardcoding. The SQL library, prefixed sql (URI: jakarta.tags.sql), provides tags like <sql:query> for executing SELECT statements and <sql:update> for modifications, allowing direct database access from JSP. However, this library is discouraged for production use due to security risks like SQL injection, with recommendations to use Jakarta Persistence (JPA) or JDBC for database operations to promote better separation of concerns. It is suitable for quick prototyping. In Jakarta EE 11, enhanced security practices, such as parameterized queries in JDBC alternatives, further emphasize moving away from embedded SQL tags to mitigate injection vulnerabilities. The XML library, with x prefix (URI: jakarta.tags.xml), supports XML document manipulation using , including <x:parse> for parsing XML sources, <x:out> for selecting and outputting nodes, and <x:forEach> for iterating over results. It is useful for processing feeds or configuration files directly in JSP. The functions library, prefixed fn (URI: jakarta.tags.functions), extends with utility functions for strings (e.g., ${fn:toUpperCase(str)}, ${fn:contains(str, substr)}), collections (e.g., ${fn:contains(collection, item)}), and escaping (e.g., ${fn:escapeXml(text)}). Since JSTL 1.2 and JSP 2.1, all tags fully integrate with the Expression Language (EL), allowing attribute values to reference beans, maps, or scoped variables without scriptlets. This EL enablement, carried forward in version 3.0, facilitates cleaner, more maintainable code. Custom tags can extend JSTL functionality where needed.

Advanced Syntax and Features

XML-Compliant JSP

XML-compliant JSP, also known as JSP documents, provides an alternative syntax for authoring Jakarta Server Pages that adheres strictly to XML well-formedness rules, enabling validation and processing as standard XML documents. This syntax replaces the classic JSP delimiters like <% %> with XML elements in the http://java.sun.com/JSP/Page namespace, ensuring compatibility with XML parsers and tools. Pages using this syntax typically employ the .jspx file extension or are configured via <jsp-property-group> with <is-xml>true in the deployment descriptor. The core syntax shift centers on the <jsp:root> as the , which requires a version attribute (e.g., "4.0") and the xmlns:jsp declaration. Directives, such as the directive, are expressed using dedicated XML like <jsp:directive.page contentType="text/html"/>, eliminating the need for <%@ %> tags. Scriptlets, expressions, and declarations are similarly mapped to such as <jsp:scriptlet>, <jsp:expression>, and <jsp:declaration>, with code embedded within sections to preserve XML validity—for instance, <jsp:scriptlet><![CDATA[/* Java code here */]]></jsp:scriptlet>. Template text that might otherwise conflict with XML syntax is wrapped in <jsp:text> , often using for special characters. All JSP-specific are namespaced, allowing seamless integration with other XML vocabularies like . This XML syntax offers several advantages, particularly for environments requiring rigorous document validation and transformation. It ensures XHTML compliance by producing well-formed output, facilitating direct rendering in XML-aware browsers or processors. XML editors can parse and validate these pages more reliably than classic JSP files, supporting features like entity resolution and schema-based checking. Additionally, the format supports transformations, enabling dynamic stylesheet applications to generate varied outputs from a single source document. Custom tag libraries integrate naturally via declarations, such as xmlns:c="http://java.sun.com/jsp/jstl/core" for the Jakarta Standard Tag Library. Conversion from classic JSP to XML-compliant syntax follows a defined mapping in the specification, where containers or tools transform elements during compilation—e.g., expanding includes, wrapping scriptlets in CDATA, and adding the <jsp:root> wrapper. While no built-in container tool performs automated migration, third-party utilities like Jsp2x can parse and convert classic JSP pages to .jspx files by applying these rules. Handling scriptlets in conversions requires careful CDATA placement to avoid XML parsing errors from embedded < or > characters. Despite these benefits, XML-compliant JSP introduces limitations, including increased verbosity due to explicit tags and declarations, which can make pages longer and harder to read compared to the concise classic syntax. It prohibits mixing with non-XML elements like unescaped <% %> delimiters and omits support for DOCTYPE declarations in the XML view. The following example illustrates a simple XML-compliant JSP page that sets a page directive and uses the Expression Language (EL) to display a dynamic greeting:
xml
<?xml version="1.0" encoding="UTF-8"?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page"
          version="4.0">
    <jsp:directive.page contentType="text/html"
                        pageEncoding="UTF-8"/>
    <html>
        <head>
            <title>XML JSP Example</title>
        </head>
        <body>
            <h1>Hello, ${[param](/page/PARAM).name}!</h1>
        </body>
    </html>
</jsp:root>
This page, when processed, outputs an document with the user's name from the name request parameter inserted via .

Error Handling and Configuration

Error handling in Jakarta Server Pages (JSP) primarily occurs at request time, where uncaught exceptions or errors during page processing can be managed through page-specific directives or application-wide configurations. The page directive allows developers to specify an error page using the errorPage attribute, such as <%@ page errorPage="error.jsp" %>, which forwards any uncaught Throwable to the designated JSP file for processing. To enable access to error details within the error page, the isErrorPage attribute must be set to true, as in <%@ page isErrorPage="true" %>, making the implicit exception object (of type java.lang.Throwable in page scope) available for custom handling. This object captures the originating exception, allowing developers to inspect its message, , or type, for example: <p>The error is: <%= exception.getMessage() %></p>. For more granular control, JSP supports standard Java exception handling within scriptlets or custom tags using try-catch blocks, such as <% try { // code that may throw an [exception](/page/Exception_handling) } catch ([Exception](/page/Exception_handling) e) { // handle locally } %>, enabling inline recovery without redirecting to a separate . At the application level, the web.xml deployment descriptor provides global mapping via the <error-page> element, which can route specific HTTP status codes (e.g., or ) or exception types to a JSP handler, ensuring consistent responses across the . Additionally, pages can access supplementary details through the pageContext.errorData property, which provides an ErrorData object containing the status code, exception type, and request , as in ${pageContext.errorData.statusCode}. Configuration of JSP behavior, including aspects relevant to error handling and , is managed through the <jsp-config> in web.xml, which groups settings via <jsp-property-group> for patterns matching specific pages or directories. This includes options like disabling scriptlets (<scripting-invalid>true</scripting-invalid>) to prevent runtime errors from invalid code or ignoring Expression Language evaluation (<el-ignored>true</el-ignored>) to avoid parsing issues. For precompilation, containers support JSP translation and compilation at deployment time, configurable via tools like Ant's <jasper> task, which generates servlet classes and mappings to mitigate initial request delays and translation-time errors. Development mode, often enabled by default in containers like via the development init parameter for the JspServlet (set to true), triggers periodic checks for JSP modifications, aiding by recompiling changed pages automatically. The keep-generated parameter (default true in many implementations) retains the intermediate Java source files produced during JSP translation, facilitating debugging by allowing inspection of generated code for stack trace correlation. Stack traces are exposed through the exception object in error pages, providing line numbers and method calls for troubleshooting request-time issues. Logging integration occurs via standard Java mechanisms, such as including java.util.logging (JUL) or Apache Log4j in scriptlets to record exceptions, e.g., <% java.util.logging.Logger.getLogger("JSP").log(java.util.logging.Level.SEVERE, "Error occurred", exception); %>, ensuring errors are persisted for analysis without relying on container-specific features. Containers implementing JSP 4.0 must also support the Jakarta Debugging Support for Other Languages specification to enhance traceability in mixed-language environments. As of November 2025, Jakarta Server Pages 4.0 (released April 9, 2024) maintains consistency in these advanced syntax and features with prior versions, with no significant changes to XML compliance or error handling mechanisms.

Implementation and Ecosystem

Supported Containers

Jakarta Server Pages (JSP) 4.0 requires a compatible servlet container that implements the 6.1 specification to execute JSP pages, as JSP relies on the servlet lifecycle for and processing. Containers handle JSP by translating pages into servlets at or precompilation. Apache Tomcat serves as the open-source reference implementation for JSP 4.0 through its 2 engine in version 11.0 (as of November 2025), which has been redesigned for improved performance in parsing and compiling JSP pages. Key features include hot deployment, allowing updates to web applications without server restarts via the manager application, and clustering support for session replication across multiple instances using DeltaManager or BackupManager for . Eclipse Jetty provides lightweight and embeddable support for JSP 4.0 in version 12.1.x and later, implementing the specification alongside Servlet 6.1 for dynamic web content generation. JSP functionality is enabled via the default JSP servlet configuration in webdefault.xml or through plugins like jetty-jspc-maven-plugin for precompilation in development workflows. Its modular design makes it suitable for microservices architectures, where low memory footprint and fast startup times facilitate containerized deployments. Eclipse GlassFish and its fork offer full 11 compatibility, including JSP 4.0, in versions such as GlassFish 8.0.0 and Platform Community 7 (certified September 2025), enabling integration with Contexts and Dependency Injection () for dependency management in JSP-based applications. These servers the 2025 long-term support (LTS) cycle for stable enterprise deployments, with emphasizing cloud-native features like enhanced security and MicroProfile alignment. WildFly, formerly JBoss, delivers enterprise-grade support for JSP 4.0 as part of its 11 compatibility in version 34.0.0.Final, featuring a modular architecture that allows selective inclusion of components for optimized runtime environments. It includes enhancements for reactive through integration with specifications like Jakarta Data and virtual threads in SE 21, extending JSP capabilities in asynchronous scenarios. All listed containers mandate Jakarta Servlet 6.1 or higher for JSP 4.0 compliance, ensuring alignment with the namespace migration from Java EE's javax.* to 's jakarta.* packages, which requires updating imports, annotations, and configuration files in existing JSP applications to avoid compatibility issues. This transition, finalized in 9 and carried forward, affects JSP tag libraries and EL expressions, with tools like the Transformer facilitating automated refactoring.

Development Tools and Best Practices

Integrated Development Environments (IDEs) play a crucial role in JSP development by providing features such as , auto-completion, and debugging capabilities tailored for applications. IntelliJ IDEA offers comprehensive support for Jakarta Server Pages through its built-in tools, enabling developers to create, edit, and debug JSP files with real-time error detection and integration with application servers. Similarly, Eclipse IDE, enhanced with plugins like the Eclipse LSP4Jakarta project, delivers support for specifications, including JSP syntax validation and refactoring tools. Build tools streamline the creation and packaging of JSP projects, ensuring efficient compilation and deployment. facilitates JSP project setup via its archetype plugin, which generates standardized skeletons including file structures for JSP integration. For precompilation, the jspc-maven-plugin compiles JSP pages into servlets during the build process, reducing runtime overhead and improving performance. complements this with plugins like the JSPC task, which handles JSP precompilation in or general environments, often used alongside packaging for container deployment. Best practices in JSP development emphasize maintainability and to avoid common pitfalls like embedded Java code. Developers should favor custom tags and the over scriptlets, as scriptlets mix presentation logic with , making code harder to maintain and test. Adopting the Model-View-Controller (MVC) pattern positions JSP primarily as the view layer, delegating data processing to servlets or controllers while using JSP for rendering. Security measures are essential, including input sanitization to prevent injection attacks and enforcing for sensitive data transmission, aligning with security standards. Testing JSP applications requires a layered approach to verify both backend logic and user interfaces. Unit tests can leverage combined with mock objects like MockHttpServletRequest to simulate HTTP requests and validate servlet-JSP interactions without a full container. For end-to-end UI testing, integrating with automates browser interactions, ensuring JSP-rendered pages function correctly across scenarios. As of 2025, JSP trends lean toward hybrid architectures that integrate with modern web paradigms, such as combining JSP for server-side rendering with REST APIs via Jakarta REST for backend services. Micro-frontends are increasingly adopted in JSP ecosystems to modularize UI components, though JSP is often avoided in single-page applications (SPAs) in favor of template engines like for better client-side compatibility.

Comparisons and Criticisms

Alternatives in Java Web Development

serves as a prominent alternative to Jakarta Server Pages (JSP) in web development, particularly within ecosystems, by offering natural templating that enables HTML files to function as static prototypes viewable in browsers without server processing. Unlike JSP, which embeds Java code via scriptlets and requires compilation into servlets, minimizes Java embedding to promote stricter separation of presentation and logic, facilitating server-side rendering while supporting , XML, , and CSS processing. This approach makes it ideal for and generating rich emails, where JSP's dependencies on Java EE containers can complicate standalone use. Apache FreeMarker and represent pure template engines that diverge from JSP by avoiding servlet-specific ties, allowing deployment in diverse environments beyond Java EE applications. FreeMarker, for example, operates independently of servlet containers, enabling generation of outputs like XML, , or for emails and reports while enforcing a clear divide between and through its template-model architecture. similarly prioritizes this separation, supporting non-web contexts without JSP's reliance on or , which can lead to tighter coupling in web scenarios. These engines are favored in or standalone apps where JSP's web-centric design imposes unnecessary overhead. Facelets, the XML-based view technology integral to JavaServer Faces (JSF), provides a component-oriented alternative to JSP, emphasizing declarative construction over scripting. Tailored for JSF's model-view-controller paradigm, Facelets builds abstract syntax trees to assemble reusable UI components, offering superior performance and templating support compared to JSP's HTML-Java hybrid, which lacks native JSF integration. This makes Facelets more suitable for complex, UI-focused applications requiring modular components, whereas JSP aligns better with simpler, script-driven pages. Modern Java web development has increasingly shifted from server-side templating like JSP toward client-side frameworks such as or , integrated with Java backends via RESTful APIs or for dynamic, responsive interfaces. JSP persists in legacy systems and basic dynamic content generation within Java EE, but client-side approaches decouple rendering from the server, reducing JSP's role to API facilitation rather than view logic. Servlets remain a core backend element in these hybrid setups, handling requests independently of frontend choices. Selection among these alternatives hinges on project needs: JSP suits simple dynamic pages in Java EE environments leveraging servlet integration, while excels in Spring-based apps requiring natural templates and prototype flexibility. FreeMarker or are optimal for logic-view separation in non-EE or microservice architectures, and Facelets for component-rich JSF UIs demanding declarative modularity. Overall, alternatives promote cleaner, more maintainable code in distributed systems over JSP's traditional embedding.

Limitations and Modern Relevance

One prominent criticism of Jakarta Server Pages (JSP) is the use of scriptlets, which embed code directly into markup, often leading to "" that mixes presentation logic with and violates . This approach makes code difficult to maintain, test, and reuse, as scriptlets are not easily unit-testable and complicate in large applications. Additionally, JSP's reliance on verbose XML configurations, such as in web.xml for servlet mappings and tag library declarations, increases and error-proneness during setup and deployment. Security vulnerabilities arise when JSP is misconfigured, particularly through Expression Language () injection, where unvalidated user input can manipulate EL statements to access sensitive data or execute arbitrary code, as seen in pre-EL 2.2 exposures via implicit objects or EL 2.2+ invocations in tags like Spring's eval. Performance limitations in JSP stem primarily from its overhead, where pages are dynamically to servlets at , causing initial load delays and spikes in high-traffic environments; this can be mitigated by precompiling JSPs but still results in slower response times compared to static templates or pre-built frameworks. In servers handling concurrent requests, this process, combined with session management overhead, can degrade , especially without optimizations like caching or efficient garbage collection tuning. Despite these drawbacks, JSP remains relevant in 2025 for maintaining legacy enterprise applications, such as those in banking and finance sectors, where it integrates seamlessly with existing ecosystems. The release of 11 in 2025 enhances its cloud viability through support for Java 17+, virtual threads, and compatibility with container orchestration tools like , enabling deployment in modern cloud-native architectures without full rewrites. However, adoption is declining in favor of reactive frameworks like , which offer lighter footprints and faster startups for . Looking ahead, JSP is actively maintained as part of the standard but shows limited innovation, with focus shifting toward hybrid approaches that combine it with newer . Migration paths to alternatives like MicroProfile or are well-documented, involving gradual refactoring of JSP views to or API-based UIs while preserving backend logic. Community surveys indicate JSP's usage at around 21% among cloud-native developers in 2024, underscoring its niche role in hybrid legacy-modern setups rather than greenfield projects.

References

  1. [1]
    Jakarta Server Pages | projects.eclipse.org
    Jakarta Server Pages is a technology that helps software developers create dynamically generated web pages based on HTML, XML, or other document types.
  2. [2]
    Jakarta Server Pages
    Jakarta Server Pages (JSP) is the Jakarta EE technology for building applications for generating dynamic web content, such as HTML, DHTML, XHTML, and XML.
  3. [3]
    Jakarta Servlet, Jakarta Faces and Jakarta Server Pages Explained
    Jakarta Server Pages is an abstraction built on top of Jakarta Servlet and it enables developers to more easily develop user interfaces using a mixture of JSP ...
  4. [4]
    Java EE Moves to the Eclipse Foundation
    Sep 12, 2017 · Oracle announced today that they, along with IBM and Red Hat, will be moving Java EE to the Eclipse Foundation. I would like to welcome ...Missing: transfer | Show results with:transfer
  5. [5]
    Jakarta EE 9 Release | Java EE 9 | The Eclipse Foundation
    The Jakarta EE 9 release is here, the future of Java EE. Download compatible products and see what's new in the specifications.
  6. [6]
    Jakarta Server Pages Specification - JSP
    Jakarta Pages defines a template engine for web applications that supports mixing of textual content (including HTML and XML) with custom tags.
  7. [7]
    Overview :: Jakarta EE Tutorial
    Jakarta EE web components are either servlets or web pages created using Jakarta Faces technology and/or Jakarta Server Pages technology. Servlets are Java ...
  8. [8]
    Jakarta Server Pages 3.1.0 | projects.eclipse.org
    May 15, 2022 · Minor update to address the small number of open issues (2 clarifications and 1 enhancement) currently open against the API.Missing: notes | Show results with:notes
  9. [9]
    Jakarta EE 11 Delivers One New Specification, 16 Updated ... - InfoQ
    Jul 1, 2025 · Jakarta Data 1.0, a new specification for the Jakarta EE 11 Platform and Web Profile, provides an API that allows easy access to database ...Missing: JSP | Show results with:JSP
  10. [10]
    Backgrounder: ASP and JSP - Computerworld
    Mar 19, 2001 · Just like ASPs, JSPs contain HTML for page layout and use embedded Java programming code that allows dynamic content to be displayed on a Web ...
  11. [11]
    The History of JSP - Raible Designs
    Jan 29, 2003 · The year 2000 saw a lot of activity, with many implementations of containers, tools, books, and training that target JSP 1.1, Servlet 2.2, and ...Missing: timeline | Show results with:timeline
  12. [12]
    JEE modules history - Article - JavaSprint
    History of JEE: ; JEE2 (J2EE 1.2), 12 Dec 1999, Servlet 2.2 JSP 1.1 ; JEE3 (J2EE 1.3), 24 Sep 2001, Servlet 2.3 JSP 1.2 ; JEE4 (J2EE 1.4), 11 Nov 2003, Servlet 2.4 ...
  13. [13]
    JSP Releases and Changes - Herong's Tutorial Examples
    Here is a list of JSP main versions and release dates: JSP 2.3 May 31, 2013 JSP 2.2 December 10, 2009 JSP 2.1 May 8, 2006 JSP 2.0. Main changes in JSP 2.3:.
  14. [14]
    Acquisition of Sun Microsystems by Oracle Corporation - Wikipedia
    On April 20, 2009, Sun and Oracle announced that they had entered into a definitive agreement under which Oracle would acquire Sun for $9.50 a share in cash.Missing: JSP | Show results with:JSP
  15. [15]
    Eclipse Foundation Unveils New Cloud Native Java Future With ...
    “Jakarta EE represents the best way to drive cloud native, mission critical applications and build upon the decades of Java EE experience of real world ...
  16. [16]
    Jakarta Server Pages 3.0 | projects.eclipse.org
    Nov 11, 2020 · Release Date. Wednesday, November 11, 2020 - 12:00. Release Type. Major release (API breakage). This release is part of Jakarta EE 9. Reviews.
  17. [17]
    Jakarta EE 10 Release | The Eclipse Foundation - Jakarta® EE
    Modernized. The Jakarta EE 10 release provides new functionality in over 20 component specifications.
  18. [18]
    Jakarta Servlet Specification
    Summary of each segment:
  19. [19]
    Apache Tomcat 9 (9.0.111) - Jasper 2 JSP Engine How To
    Oct 10, 2025 · Tomcat 9.0 uses the Jasper 2 JSP Engine to implement the JavaServer Pages 2.3 specification. Jasper 2 has been redesigned to significantly improve performance.Introduction · Configuration · Production Configuration
  20. [20]
    JSPC Task - Apache Ant
    This task can be used to precompile JSP pages for fast initial invocation of JSP pages, deployment on a server without the full JDK installed, or simply to ...
  21. [21]
    Servlets and JSP Pages Best Practices - Oracle
    Best practices are proven approaches for developing quality, reusable, and easily maintainable servlet- and JSP-based web applications.
  22. [22]
    Jakarta Server Pages
    This document is the authoritative JSP 3.1 specification. It is intended to provide requirements for implementations of JSP page processing, and support by web ...Missing: modularity | Show results with:modularity
  23. [23]
    Jakarta Expression Language
    This is the Expression Language specification version 5.0, developed by the Jakarta Expression Language Team under the Eclipse Foundation Specification Process.
  24. [24]
  25. [25]
  26. [26]
    Java Specification Requests - detail JSR# 341
    Mar 15, 2011 · The Expression Language (EL), has been part of JSP specification since JSP 2.0. It enables a JSP or JSF application to access and manipulate ...
  27. [27]
    [PDF] Expression Language Specification - Software Download
    Mar 2, 2019 · The JSP Standard Tag Library (JSTL) version 1.0 (based on JSP 1.2) was therefore first to introduce an Expression Language (EL) to make it easy ...
  28. [28]
  29. [29]
  30. [30]
    Jakarta Server Pages
    Summary of each segment:
  31. [31]
  32. [32]
  33. [33]
  34. [34]
  35. [35]
  36. [36]
  37. [37]
    Jakarta Standard Tag Library 3.0 | The Eclipse Foundation
    Jakarta Standard Tag Library 3.0 Specification Document (PDF) ... Find Starter Guides, Tutorials, and Documentation to help you get started with Jakarta EE.
  38. [38]
    Jakarta Standard Tag Library | projects.eclipse.org
    JSTL has support for common, structural tasks such as iteration and conditionals, tags for manipulating XML documents, internationalization tags, and SQL tags.
  39. [39]
    jakarta.servlet.jsp.jstl.sql - Java EE API - Open Liberty
    This package is now deprecated. jakarta.faces.component ... Classes and interfaces related to the sql tag library component of the Jakarta Standard Tag Library.
  40. [40]
    5 Common Jakarta EE Security Issues and Solutions - OmniFish
    Mar 27, 2025 · Injection Attacks: SQL, XML, and LDAP injection attacks exploit unvalidated inputs. Prevent them with parameterized queries, input validation, ...
  41. [41]
    [PDF] Jakarta Server Pages
    A JSP Page and its Corresponding XML View. Here is an example of mapping between JSP and XML syntax. For this JSP page: <html>. <title>positiveTagLib</title>.
  42. [42]
    Convert JSP pages to JSP documents (JSPX) with Jsp2x
    Jan 17, 2008 · Jsp2x is a command-line tool that converts JSP pages to JSP documents (JSPX), which are well-formed XML files, using a more complex parser.Missing: classic | Show results with:classic
  43. [43]
    JSON vs. XML: The Data Exchange Debate - DEV Community
    May 28, 2025 · In 2024, 78% of APIs used JSON for data exchange, yet XML remains a staple in enterprise systems. The JSON vs. XML debate shapes how developers ...
  44. [44]
  45. [45]
  46. [46]
  47. [47]
  48. [48]
  49. [49]
  50. [50]
  51. [51]
  52. [52]
  53. [53]
    Apache Tomcat 10 (10.1.48) - Documentation Index
    Oct 10, 2025 · Apache Tomcat version 10.1 implements the Servlet 6.0 and Pages 3.1 specifications from Jakarta ... Apache Tomcat Server Architecture ...Tomcat Setup · Logging in Tomcat · Proxy Support How-To · Building Tomcat
  54. [54]
    Apache Tomcat 10 (10.1.48) - Jasper 2 JSP Engine How To
    Oct 10, 2025 · Tomcat 10.1 uses the Jasper 2 JSP Engine to implement the Jakarta Pages 3.1 specification. Jasper 2 has been redesigned to significantly improve performance.
  55. [55]
    Apache Tomcat 9 (9.0.111) - Tomcat Web Application Deployment
    Oct 10, 2025 · This is a package which can be used to validate, compile, compress to .WAR, and deploy web applications to production or development Tomcat ...
  56. [56]
    Apache Tomcat 9 (9.0.111) - Clustering/Session Replication How-To
    Oct 10, 2025 · Tomcat can perform an all-to-all replication of session state using the DeltaManager or perform backup replication to only one node using the BackupManager.For The Impatient · Configuration Example · How It Works
  57. [57]
    Eclipse Jetty | endoflife.date
    Oct 22, 2025 · Eclipse Jetty is an open-source (Apache-2.0 licensed) pure-Java HTTP web server environment. It implements various Jakarta web specifications.
  58. [58]
    Java Server Pages - Eclipse Jetty
    It is configured as the default jsp servlet in the $JETTY_HOME/etc/webdefault.xml file. Notice that Jetty identifies the jsp servlet by the presence of the ...Missing: microservices | Show results with:microservices
  59. [59]
    The Eclipse Jetty Project :: Eclipse Jetty
    Eclipse Jetty provides a highly scalable and memory-efficient web server and servlet container, supporting many protocols such as HTTP/3,2,1 and WebSocket.Jetty Downloads · Support · Jetty Documentation · Jetty SecurityMissing: JSP | Show results with:JSP
  60. [60]
    Download Compatible Products - Jakarta® EE
    Find Jakarta EE compatible products including enterprise java application servers and platforms to build your cloud native Java application.
  61. [61]
    Top 10 Java Application Servers for 2025 - Mkyong.com
    Feb 10, 2025 · Open-source alternatives like WildFly, Payara, and GlassFish offer flexibility with Jakarta EE support. No matter the application size ...Missing: 3.1 | Show results with:3.1<|control11|><|separator|>
  62. [62]
    Jakarta EE 11 Web Profile Released, Enabled by Eclipse GlassFish
    Apr 22, 2025 · Jakarta EE 11 Web Profile delivers an updated and streamlined set of specifications designed for lightweight, server-side Java applications.Missing: JSP | Show results with:JSP
  63. [63]
    WildFly 34 is released!
    Oct 17, 2024 · WildFly Preview no longer supports SE 11, as the baseline for Jakarta EE 11 is SE 17. While we recommend using an LTS JDK release, I do believe ...<|separator|>
  64. [64]
    WildFly and WildFly Preview
    Oct 17, 2024 · Beginning with this release we are starting to use WildFly Preview to provide a look at what we're doing for Jakarta EE 11 support. EE 11 is not ...
  65. [65]
    WildFly 34 Adds Preview of Jakarta EE 11 and Support for ... - InfoQ
    Nov 22, 2024 · It now includes support for Jakarta Data 1.0, MicroProfile REST Client 4.0, and MicroProfile Telemetry 2.0. Other minor updates include ORM 6.6.x, Hibernate ...
  66. [66]
    Apache Tomcat® - Which Version Do I Want?
    Apache Tomcat® is an open source software implementation of a subset of the Jakarta EE (formally Java EE) technologies. Different versions of Apache Tomcat ...
  67. [67]
    Migrate From Java EE to Jakarta EE | Baeldung
    Sep 1, 2024 · In 2017, Oracle decided to move the development of Java EE to the Eclipse Foundation, a nonprofit organization known for fostering open-source ...
  68. [68]
    Migrating from the `javax` to `jakarta` namespace - JetBrains Guide
    Nov 12, 2024 · How to transition your application from Java EE to Jakarta EE. ; Setting the scene. Downloading the project and running the application.
  69. [69]
    Jakarta EE | IntelliJ IDEA Documentation - JetBrains
    Apr 2, 2025 · IntelliJ IDEA provides support for developing enterprise Java applications based on Jakarta EE (formerly known as Java EE).
  70. [70]
    eclipse-lsp4jakarta/lsp4jakarta: Language Server for Jakarta EE
    The Eclipse LSP4Jakarta (Language Server for Jakarta EE) project provides language support capabilities for the specifications defined under the Jakarta EE ...Table Of Contents · Features · Jakarta Bean Validation
  71. [71]
    Introduction – Maven Archetype Plugin
    Oct 3, 2025 · The Archetype Plugin allows the user to create a Maven project from an existing template called an archetype. It also allows the user to create ...
  72. [72]
    jspc-maven-plugin » 4.2.0
    JSPC Maven Plugin » 4.2.0 ; Apache 2.0 · Maven Plugins · pluginbuildbuild-systemmavenjsp · https://github.com/leonardehrenfried/jspc-maven-plugin#readm ... · Feb 14, ...
  73. [73]
    com.liferay.jasper.jspc - Gradle Plugin Portal
    Jul 2, 2025 · The Jasper JSPC Gradle plugin lets you run the Liferay Jasper JSPC tool to compile the JavaServer Pages (JSP) files in your project.
  74. [74]
    JSP Best Practices - Java Guides
    1. Use MVC Architecture · 2. Minimize Java Code in JSP · 3. Use JSP Include Directives · 4. Use JSP Custom Tags and Tag Libraries · 5. Use Expression Language (EL).Missing: favor | Show results with:favor
  75. [75]
    Code Conventions for the JavaServer Pages Technology Version 1 ...
    In this article, we propose a set of standard conventions for writing JSP pages (versions 1.1 and 1.2) that should be followed on a typical software project ...
  76. [76]
    How to Mock HttpServletRequest | Baeldung
    Jan 24, 2024 · Learn multiple ways to mock a HttpServletRequest object when unit testing Servlet code in Java.
  77. [77]
    Junit Test with Selenium WebDriver - GeeksforGeeks
    Jul 23, 2025 · JUnit and Selenium are integrated to write automation tests. JUnit provides assertions, while Selenium provides automation and UI handling.  ...
  78. [78]
    Beyond the Hype: 10 Reasons Jakarta EE Is Still the Smartest Choice
    Jul 31, 2025 · Jakarta EE supports incremental evolution toward cloud-native architectures: Use Jakarta REST for APIs. Jakarta Config for environment ...2. Standardised And... · 7. Security And Compliance... · 10. Open Source And Open...Missing: Server frontends Thymeleaf
  79. [79]
    JSP to React or Thymeleaf | Gen AI Modernization Guide - Legacyleap
    Migrate from JSP to Thymeleaf or React with AI-driven refactoring. Modernize Java UIs while preserving backend logic through safe, incremental migration.
  80. [80]
    Template Engines for Spring | Baeldung
    Dec 12, 2024 · Thymeleaf is a Java template engine which can process HTML, XML, text, JavaScript or CSS files. Unlike other template engines, Thymeleaf allows ...
  81. [81]
    Spring MVC: from JSP and Tiles to Thymeleaf
    Oct 30, 2012 · Unlike JSPs, Thymeleaf works well for Rich HTML emails (see http://www.thymeleaf.org/springmail.html). On the down side: Thymeleaf does not have ...
  82. [82]
    FreeMarker: An open alternative to JSP - InfoWorld
    Unlike JSP, FreeMarker tags are independent of the source-file format; they can just as easily be placed in an XML file, WML file, HTML file, or plain text file ...
  83. [83]
    Java Template Engine Library - FreeMarker vs. Velocity
    An advantage of Velocity over FreeMarker is that Velocity has wider third party support and a much larger user community. However, you might need less support ...
  84. [84]
    Difference Between JSF, Servlet, and JSP | Baeldung
    Jan 6, 2021 · For the same purpose, JSP uses HTML and JSF uses Facelets. Additionally, both provide support for custom tags, too. There's no default support ...
  85. [85]
    [PDF] Facelets and its use in Web Applications - Java EE
    Facelets is a replacement for JSP that was designed from the outset with JSF in mind. New features introduced in version 2 and later are only exposed to page ...<|separator|>
  86. [86]
    Migrating a Spring Web MVC application from JSP to AngularJS
    Aug 19, 2015 · In this article, we try to describe our experiences moving from server-side rendering view technologies like JSP, Struts and Velocity to client-side rendering ...
  87. [87]
    JSP Call Java Class Example - Java Code Geeks
    Jun 24, 2025 · JSP is intended to act as the View, and embedding too much Java code within it breaks the clean separation of concerns. There are two common ...<|separator|>
  88. [88]
    Disadvantages of using scriptlet? [duplicate] - java - Stack Overflow
    Feb 24, 2014 · I want to know the whole thing about using scriplet. Why is it not recommended when coding JSP(s). Everytime I ask about coding with scriptlet, ...How can I avoid Java code in JSP files, using JSP 2? - Stack OverflowJSP - What is wrong with scriptlets, and what to use instead [duplicate]More results from stackoverflow.comMissing: separation | Show results with:separation
  89. [89]
    Understanding configuration in web.xml file - Manh Phan
    Feb 28, 2019 · In this article, we will discuss about configuration in web.xml file, especially in Servlet programming for maintaining project.<|separator|>
  90. [90]
    Expression Language Injection - OWASP Foundation
    Expression Language Injection on the main website for The OWASP Foundation. OWASP is a nonprofit foundation that works to improve the security of software.
  91. [91]
    10 Apache Tomcat Performance Tuning Tips and Best Practices
    Dec 27, 2019 · Precompile JSPs to avoid compilation overhead on production servers. Likewise, set genStringAsCharArray to “true” to produce more efficient char ...
  92. [92]
    How to tune up the performance of JSP through configuration?
    Sep 13, 2010 · One of old tricks is to precompile all your JSP files. Others can be done by measuring and finding what are the bottlenecks.Spring boot application slow because of jsp compilationperformance issue to load huge records in a single jsp pageMore results from stackoverflow.comMissing: issues overhead
  93. [93]
    Jakarta EE 11 is Here - And It's Ready for the Cloud! - Payara Server
    Jun 26, 2025 · Building on the Core Profile (Dec 2024) and Web Profile (Mar 2025), this release brings powerful new features aimed at boosting developer ...Missing: JSP 3.1
  94. [94]
    Jakarta EE 11 Overview: Virtual Threads, Records, and the Future of ...
    Jul 29, 2025 · Jakarta EE 11 evolves context and dependency injection with the removal of the Jakarta Managed Beans specification in favor of CDI alternatives.
  95. [95]
    Jakarta EE Platform 11 | Jakarta EE | The Eclipse Foundation
    Minimum Java SE Version. Java SE 17 or higher ... Jakarta EE Platform 11 Specification Document (PDF); Jakarta EE Platform 11 Specification Document (HTML).
  96. [96]
    Spring Boot With JavaServer Pages (JSP) | Baeldung
    Jan 8, 2024 · A quick side note here is that JSP has limitations on its own and even more so when combined with Spring Boot. So, we should consider Thymeleaf ...
  97. [97]
    Gradual Migration from Java EE to MicroProfile - Payara Server
    Oct 21, 2025 · So how can you migrate easily from your favorite Java EE server to a MicroProfile implementation? This session shows you an overview of what ...Missing: paths JSP
  98. [98]
    2024 Cloud Native Java Survey Findings | Jakarta EE | The Eclipse ...
    The majority of developers still use the full Jakarta EE platform. · The largest cohort of developers say they are using Jakarta EE and MicroProfile together.