Thanks for putting in the time on a great reply! At this point, am cautiously optimistic that this will work, or rather that I can get it to work. I've got a few frames updating, so it looks like that's just the ticket. Thanks again!
-jeff
On Friday, June 20, 2003, at 09:17 AM, Jason Lea wrote:
If you want to use frames then each frame is going to issue it's own request. If you want to hide the JSPs under WEB-INF, then you have to front each request with an action because you can't link to the JSP directly.
It probably means replacing your definition with:
<definition name="associator.masterPage" path="/WEB-INF/pages/tiles/framesetLayout.jsp"> <put name="title" value="Associator" /> <put name="heading" value="/Heading.do" /> <put name="code" value="/EmptyMenu.do" /> <put name="menu" value="/Menu.do" /> <put name="button" value="/Button.do"/> <put name="text" value="/Categories.do"/> </definition>
and adding an action mapping to struts-config.xml for each of the items:
<action path="/Heading" type="org.apache.struts.actions.ForwardAction" parameter="associator.masterPage.heading"/>
and then another definition in tiles-def.xml:
<definition name="associator.masterPage.heading" path="/WEB-INF/pages/tiles/heading.jsp">
Have to repeat that for code, menu, button, text. So then if a real action wanted to change both code and menu frames, you can create a definition that extends the first definition:
<definition name="associator.masterPage.newpage" extends="associator.masterPage"> <put name="title" value="New Definition" /> <put name="code" value="/NewCodePage.do" /> <put name="menu" value="/NewMenu.do" /> </definition>
I'm not sure if this will work - as it is 2am here and I am about to go to bed :) But it looks ok to my half-closed eyes
Jeff Kyser wrote:Hello,
I was trying to use a Tile Definition like:
<definition name="associator.masterPage"
path="/WEB-INF/pages/tiles/framesetLayout.jsp">
<put name="title" value="Associator" />
<put name="heading" value="/WEB-INF/pages/tiles/heading.jsp" />
<put name="code" value="/WEB-INF/pages/tiles/emptyMenu.jsp" />
<put name="menu" value="/WEB-INF/pages/menu.jsp" />
<put name="button" value="/WEB-INF/pages/button.jsp"/>
<put name="text" value="/WEB-INF/pages/categories.jsp"/>
</definition>
with a framesetLayout.jsp that looks like:
<frameset rows="137,*" frameborder="NO" border="0" framespacing="0">
<frame src="<%=request.getContextPath()%><tiles:getAsString name="heading" />" name="heading" scrolling="NO" noresize>
<frameset cols="217,*" frameborder="NO" border="0" framespacing="0">
<frameset rows="0,*" frameborder="NO" border="0" framespacing="0">
<frame src="<%=request.getContextPath()%><tiles:getAsString name="code" />" name="code">
<frame src="<%=request.getContextPath()%><tiles:getAsString name="menu" />" name="menu">
</frameset>
<frameset rows="26%,*" frameborder="0" border="0" framespacing="5" cols="*">
<frame src="<%=request.getContextPath()%><tiles:getAsString name="button" />" name="button" noresize/>
<frame src="<%=request.getContextPath()%><tiles:getAsString name="text" />" name="text" noresize/>
</frameset>
</frameset>
</frameset>
but I get Forbidden errors, presumably because my JSPs are beneath the WEB-INF directory and
therefore not accessible.
Is there an alternate way to do this and still have my JSPs underneath WEB-INF?
(Basically, I have a frames-based layout with a scrollable panel, and am trying
to figure out how to best implement that feature using Struts/Tiles without exposing all
my JSPs.
TIA,
-jeff
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-- Jason Lea
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]