public final class ApplicationAdapter extends javax.servlet.jsp.tagext.BodyTagSupport implements ParameterOwner
Application
inside a JSP page. This is achieved by calling the given
Application
and then transforming the returned Platform
using an XSLT
stylesheet.
Attributes:
Application
that should be embedded.
Parameters: (<appNG:param>
)
Site
's
repository folder. If omitted, the plain XML is written as an HTML commentEnvironment
-attribute with the scope Scope.REQUEST
where the
transformation result should be stored in. If this parameter is not set, the result is directly written to the JSP's
Writer
.GET-Parameters:
false
, the plain XML is written as an HTML comment
Usage:
The following example assumes you want to embed the application acme-app
into the page /en/acme
.
Every path segment after /en/acme
is passed as an url-parameter to the application.
<appNG:application name="acme-app"> <appNG:param name="defaultBaseUrl">/en/acme</appNG:param> <appNG:param name="defaultPage">/index/welcome</appNG:param> <appNG:param name="xslStyleSheet">/meta/xsl/acme/platform.xsl</appNG:param> <appNG:param name="requestAttribute">acmeResult</appNG:param> </appNG:application> <!-- later in JSP --> <appNG:attribute mode="read" name="acmeResult" scope="REQUEST" />
Constructor and Description |
---|
ApplicationAdapter() |
Modifier and Type | Method and Description |
---|---|
void |
addParameter(String name,
String value) |
int |
doEndTag() |
protected int |
doRedirect(javax.servlet.http.HttpServletResponse servletResponse,
String location,
String redirectTarget) |
int |
doStartTag() |
protected String |
getBaseUrl(SiteImpl executingSite,
String defaultBaseUrl,
List<String> urlParameters,
String jspExtension,
String repositoryPath,
String requestURI) |
protected String |
normalizeUrl(Site executingSite,
String jspExtension,
String location,
String baseUrl) |
void |
setName(String application) |
String |
transform(File xslFile,
String content,
long templateMaxAge) |
String |
transform(File xslFile,
String content,
long templateMaxAge,
boolean doTransform) |
doAfterBody, doInitBody, getBodyContent, getPreviousOut, release, setBodyContent
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue
public void setName(String application)
public int doStartTag() throws javax.servlet.jsp.JspException
doStartTag
in interface javax.servlet.jsp.tagext.Tag
doStartTag
in class javax.servlet.jsp.tagext.BodyTagSupport
javax.servlet.jsp.JspException
public final int doEndTag()
doEndTag
in interface javax.servlet.jsp.tagext.Tag
doEndTag
in class javax.servlet.jsp.tagext.BodyTagSupport
public void addParameter(String name, String value)
addParameter
in interface ParameterOwner
protected int doRedirect(javax.servlet.http.HttpServletResponse servletResponse, String location, String redirectTarget) throws IOException
IOException
protected String getBaseUrl(SiteImpl executingSite, String defaultBaseUrl, List<String> urlParameters, String jspExtension, String repositoryPath, String requestURI)
protected String normalizeUrl(Site executingSite, String jspExtension, String location, String baseUrl)
public String transform(File xslFile, String content, long templateMaxAge, boolean doTransform) throws TransformerConfigurationException, TransformerException
public String transform(File xslFile, String content, long templateMaxAge) throws TransformerConfigurationException, TransformerException
Copyright © 2011–2019 aiticon GmbH. All rights reserved.