Package org.apache.juneau.rest.server.view


package org.apache.juneau.rest.server.view
Engine-agnostic server-side-rendered view extension point.

Hosts the View interface — the stable contract that per-engine bridge modules (juneau-rest-server-view-jsp, -thymeleaf, -mustache, -freemarker) implement and pair with a ViewRenderer that detects their own View subtype on @RestOp-method return values and dispatches to the underlying templating engine.

Keeping the interface in juneau-rest-server's core (rather than in any one engine bridge) lets a @RestOp method declare a View return type without forcing a compile-time dependency on a specific engine, and lets host code interoperate with multiple bridge modules in the same application.

Renderer auto-prepend

Any ResponseProcessor implementing ViewRenderer is automatically repositioned to run before the first CatchAllResponseProcessor (i.e. SerializedPojoProcessor) during ResponseProcessorList construction. This ensures that a @RestOp method returning a typed View subclass (JspView, ThymeleafView, etc.) reaches the matching renderer without the user having to enumerate a full custom processor chain.

Third-party renderers gain the same ordering guarantee by implementing ViewRenderer.

Since:
10.0.0