[
http://issues.apache.org/jira/browse/BEEHIVE-199?page=comments#action_60534 ]
Carlin Rogers commented on BEEHIVE-199:
---------------------------------------
This seems to work OK. The tiles definition config
file is loaded during the tiles plugin processing
and the definitions are stored. The example application
may not work because the JSP files provided in the
tiles definitions may not have been located by the
app at run time. This depends on how the paths to the
JSPs are defined in the definitions.
The tiles insert tag uses a PageContext.include().
So a layout or template JSP that uses an insert needs
a path that is either relative from this PageContext
to the JSP to include or is an absolute path from
the web app root.
E.g. For a definition with a template JSP
<definition name="defaultLayout"
path="/tiles/jsp/layout/default.jsp">
any included pages must be relative to the default.jsp
file or absolute from the web app. Either something like
<put name="body" value="../../pf/mainBody.jsp" />
or
<put name="body" value="/tiles/pf/mainBody.jsp" />
To avoid confusion, I will add code to normalize the
path to avoid any confusion. Leaving this open for now.
> Cannot reference Tiles Definition files outside the current page flow using
> relative paths.
> -------------------------------------------------------------------------------------------
>
> Key: BEEHIVE-199
> URL: http://issues.apache.org/jira/browse/BEEHIVE-199
> Project: Beehive
> Type: Bug
> Components: NetUI
> Versions: V1Beta
> Environment: Running the usual components required by Beehive V1Beta on a
> Win32 box. Local test environment.
> Reporter: Nathan Jantz
> Assignee: Carlin Rogers
>
> Cannot reference Tiles Definition files outside the current page flow when
> using relative paths.
> Example use-case 1 (nested page flow):
> ---------------------------------------
> Reference a tiles definition file from within a nested page flow where the
> tiles definition file lives in the parent page flow directory (one directory
> above) like so:
> @Jpf.Controller(
> tilesDefinitionsConfigs = { "../tiles-defs.xml" },
> simpleActions={
> @Jpf.SimpleAction(name="begin", tilesDefinition="default.page")
> }
> )
> Which does not work because the generated output would look like this:
> <plug-in className="org.apache.struts.tiles.TilesPlugin">
> <set-property property="definitions-config"
> value="\nested/../tilesdefs.xml"/>
> <set-property property="moduleAware" value="true"/>
> </plug-in>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira