Class JspMixin.Builder
- All Implemented Interfaces:
ViewMixinBuilder<JspMixin.Builder>
- Enclosing class:
- JspMixin
JspMixin.
Mirrors JspDispatcher.Builder's configuration methods on its own surface and forwards
each call into a held JspDispatcher.Builder (worker-bean composition).
Implements ViewMixinBuilder so basePath(String) is guaranteed to transfer
to the sibling Thymeleaf / Mustache / FreeMarker bridge builders; see
cacheTemplates(boolean) for this bridge's no-op conformance caveat.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBuilder()Constructor — package access forJspMixin.create(). -
Method Summary
Modifier and TypeMethodDescriptionSets the classpath / webapp base path under which.jspresources are resolved.build()Builds theJspMixin.cacheTemplates(boolean value) Accepted forViewMixinBuilderconformance; has no effect on the JSP bridge.Reads the current base path setting (test/inspection helper).booleanReads the current cache-templates setting (test/inspection helper).
-
Constructor Details
-
Builder
protected Builder()Constructor — package access forJspMixin.create().
-
-
Method Details
-
basePath
Sets the classpath / webapp base path under which.jspresources are resolved.Defaults to
"/". A typical configured value is"/WEB-INF/views/"— the Servlet-spec convention for hiding template files from direct HTTP access.- Specified by:
basePathin interfaceViewMixinBuilder<JspMixin.Builder>- Parameters:
value- The base path.nullor blank values reset to the defaultJspMixin.DEFAULT_BASE_PATH.- Returns:
- This object.
-
cacheTemplates
Accepted forViewMixinBuilderconformance; has no effect on the JSP bridge.JSP recompilation is delegated entirely to the servlet container via
RequestDispatcher.forward(...)— there is no bridge-owned template cache to disable. Containers manage their own JSP recompilation policy (e.g. Tomcat's Jasperdevelopment/modificationTestIntervalservlet-init-params, or Jetty's equivalent) outside this bridge's control. The value is stored and reported back byisCacheTemplates()/JspMixin.isCacheTemplates()purely so callers coding against the sharedViewMixinBuildercontract get a consistent round-trip, not because it changes rendering behavior.- Specified by:
cacheTemplatesin interfaceViewMixinBuilder<JspMixin.Builder>- Parameters:
value- The cache flag (recorded only; see above).- Returns:
- This object.
-
getBasePath
Reads the current base path setting (test/inspection helper).- Returns:
- The base path. Never
null.
-
isCacheTemplates
Reads the current cache-templates setting (test/inspection helper).See
cacheTemplates(boolean)— this bridge has no template cache to report on; the value is whatever was last recorded.- Returns:
- The cache flag.
-
build
Builds theJspMixin.- Returns:
- A new
JspMixininstance.
-