Class ApplicationAdapter

  • All Implemented Interfaces:
    Serializable, javax.servlet.jsp.tagext.BodyTag, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag, ParameterOwner

    public final class ApplicationAdapter
    extends javax.servlet.jsp.tagext.BodyTagSupport
    implements ParameterOwner
    Used to embed an appNG 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 - the name of the Application that should be embedded.

    Parameters: (<appNG:param>)

    • defaultBaseUrl - the url of the page where the application is embedded
    • defaultPage - The default page of the application, used when the url parameters do not contain a page name
    • xslStyleSheet - The path to the XSLT stylesheet used for transformation, relative to the Site's repository folder. If omitted, the plain XML is written as an HTML comment
    • requestAttribute - The name of an Environment-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.
    • locale - The locale to use, for example en_US or es_MX

    GET-Parameters:

    • xsl - if 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" />
     
    Author:
    Matthias Müller
    See Also:
    Serialized Form
    • Field Summary

      • Fields inherited from class javax.servlet.jsp.tagext.BodyTagSupport

        bodyContent
      • Fields inherited from class javax.servlet.jsp.tagext.TagSupport

        id, pageContext
      • Fields inherited from interface javax.servlet.jsp.tagext.BodyTag

        EVAL_BODY_BUFFERED, EVAL_BODY_TAG
      • Fields inherited from interface javax.servlet.jsp.tagext.IterationTag

        EVAL_BODY_AGAIN
      • Fields inherited from interface javax.servlet.jsp.tagext.Tag

        EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE