Class JspServlet

java.lang.Object
jakarta.servlet.GenericServlet
jakarta.servlet.http.HttpServlet
All Implemented Interfaces:
jakarta.servlet.Servlet, jakarta.servlet.ServletConfig, Serializable

public class JspServlet extends ViewServlet
Standalone servlet companion of the JspMixin mixin.

Mounts as a sibling top-level servlet at /jsp/* (a sibling of the host application's other servlets, e.g. /rest/*) and serves raw .jsp resources by delegating to a shared JspDispatcher worker — the same flavor-neutral RawTemplateDispatcher implementation the mixin and child flavors hold, so the forms cannot drift.

Whereas the JspMixin mixin pins its op at /jsp/* for composition into a host at /, this companion declares the mount at the class level (@Rest(paths="/jsp/*")) and inherits the /* op from ViewServlet — eliminating the path-doubling that a mixin-shaped op would produce when the servlet itself is mounted at /jsp/*.

Microservice registration:

@Bean Servlet jsp() { return new JspServlet(); // auto-mounted at /jsp/* by JettyServerComponent }

The default mount /jsp/* can be relocated by overriding RestServlet.getPaths() or via the programmatic RestContext.Builder.paths(...) rung; the underlying base path for resolving .jsp files is configured on the JspDispatcher worker.

See Also:
Since:
10.0.0