| Constructor and Description |
|---|
TemplatePage(String path,
String contentType,
TemplateContextFactory templateContextFactory,
Template template)
Creates a new template page.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getPath()
Returns the path of this page.
|
Response |
handleRequest(REQ request,
Response response)
Handles a request.
|
boolean |
isPrefixPage()
Returns whether this page handles all paths beginning with
Page.getPath() or whether this page only handles a single path. |
protected void |
processTemplate(TemplateContext templateContext,
REQ request)
Allows subclasses to manipulate the template context in dependency of the
request being served before the template itself is rendered.
|
public TemplatePage(String path, String contentType, TemplateContextFactory templateContextFactory, Template template)
path - The path of the pagecontentType - The content type of the pagetemplateContextFactory - The template context factorytemplate - The template to renderpublic String getPath()
public boolean isPrefixPage()
Page.getPath() or whether this page only handles a single path.isPrefixPage in interface Page<REQ extends Request>true if this page can handle multiple paths,
false if it handles only a single pathpublic Response handleRequest(REQ request, Response response) throws IOException
handleRequest in interface Page<REQ extends Request>request - The request to handleresponse - The responseIOException - if an I/O error occursprotected void processTemplate(TemplateContext templateContext, REQ request) throws RedirectException
templateContext - The template contextrequest - The request being servedRedirectException - if a redirect should be performedCopyright © 2026. All rights reserved.