tiles-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andy T <verygoofy...@gmail.com>
Subject Re: Tiles Problem
Date Mon, 21 Dec 2009 13:48:36 GMT
Hi Antonio,

Thanks for responding to my email . . . sorry for the delay I was out
Friday .  .  .

I'm using Struts 1.3 and Tiles 2.1.

What I'm trying to do is take a base definition in my tiles-defs.xml
and extend it for each of the individual .jsp's I have in my
application.  So I'd like to do something like this:

<!--  Base Tiles Definition -->
   <definition name="base.definition" template="/template.jsp">
      <put-attribute name="title" value="Tiles tutorial homepage" />
      <put-attribute name="header" value="/header.jsp" />
      <put-attribute name="menu" value="/menu.jsp" />
      <put-attribute name="leftnav" value="/leftnav.jsp" />
      <put-attribute name="footer" value="/footer.jsp" />
   </definition>
	
<!-- Tiles Definition of priority page -->
   <definition name="page.priority" extends="base.definition">
      <put-attribute name="body" value="/priority.jsp" />
   </definition>

I'm currently trying to execute the "maintain" action in struts-config.xml

<action path="/maintain" type="struts.Maintain">
            <forward name="ShowPriority" path="page.priority"/>
</action>

where the action class "struts.Maintain" has a line in it:

forward = mapping.findForward("ShowPriority");

When I attempt this I get the error message:

"java.lang.IllegalArgumentException: Path page.priority does not start
with a "/" character"

So I suppose there are two questions here:  First, is it possible to
apply the concept I want to apply with Struts 1.3 and Tiles 2.1?  If
so, what is the exact syntax required?  If not, what is my next best
alternative?

Thanks,

Andy




On Fri, Dec 18, 2009 at 3:25 AM, Antonio Petrelli
<antonio.petrelli@gmail.com> wrote:
> 2009/12/17 Andy T <verygoofyone@gmail.com>:
>> Also, is this the best way to set up or architect a tiles solution in
>> struts?
>
> Struts? What version? Can I see how you configure Tiles in Struts?
> What version of Tiles are you using?
>
> Antonio
>

Mime
View raw message