You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Jarrod M. Lugo" <jl...@ebidenergy.com> on 2003/02/13 21:14:22 UTC
Newbie Question about tiles definitions. I am lost :(
Hello,
I am trying to get tiles to work with definitions, and I am having a little
trouble. How do I get either the home page or products page to show up in
my browser?
struts-config.xml:
<action path="/home">
<forward name="success" path=".home" />
</action>
<action path="/products">
<forward name="success" path=".products" />
</action>
tiles-def.xml:
<definition name=".home" path="/basicLayout.jsp">
<put name="title" value="Home" />
</definition>
<definition name=".products" path="/basicLayout.jsp">
<put name="title" value="Products" />
</definition>
basicLayout.jsp:
<html>
<body>
<tiles:getAsString name="title" />
</body>
</html>
TIA,
Jarrod Lugo
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
RE: Newbie Question about tiles definitions. I am lost :(
Posted by "Jarrod M. Lugo" <jl...@ebidenergy.com>.
I changed the action mapping, but I don't think I have an action servlet.
How do I map *.do to the action servlet?
Thanks,
Jarrod Lugo
-----Original Message-----
From: John Espey [mailto:jespey@tallan.com]
Sent: Thursday, February 13, 2003 3:56 PM
To: Struts Users Mailing List
Subject: RE: Newbie Question about tiles definitions. I am lost :(
If you have *.do mapped to the action servlet, then you will need to request
(relative to the webapp of course) "/home.do" or "/products.do". You'll
need to switch the action mapping like so:
<action path="/home" forward="tiles.home">
Or else configure the mapping such that an action that automatically
forwards to "success" (I think ForwardAction does the trick) is specified.
I haven't tried using the "." as the first character in the tile name, but
it may work. I changed it in the above snippet just in case.
> -----Original Message-----
> From: Jarrod M. Lugo [mailto:jlugo@ebidenergy.com]
> Sent: Thursday, February 13, 2003 2:14 PM
> To: Struts-User@Jakarta. Apache. Org
> Subject: Newbie Question about tiles definitions. I am lost :(
>
>
> Hello,
>
> I am trying to get tiles to work with definitions, and I am
> having a little
> trouble. How do I get either the home page or products page to show up in
> my browser?
>
> struts-config.xml:
>
> <action path="/home">
> <forward name="success" path=".home" />
> </action>
> <action path="/products">
> <forward name="success" path=".products" />
> </action>
>
>
> tiles-def.xml:
>
> <definition name=".home" path="/basicLayout.jsp">
> <put name="title" value="Home" />
> </definition>
>
> <definition name=".products" path="/basicLayout.jsp">
> <put name="title" value="Products" />
> </definition>
>
>
> basicLayout.jsp:
>
> <html>
> <body>
> <tiles:getAsString name="title" />
> </body>
> </html>
>
>
> TIA,
> Jarrod Lugo
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
RE: Newbie Question about tiles definitions. I am lost :(
Posted by John Espey <je...@tallan.com>.
If you have *.do mapped to the action servlet, then you will need to request
(relative to the webapp of course) "/home.do" or "/products.do". You'll
need to switch the action mapping like so:
<action path="/home" forward="tiles.home">
Or else configure the mapping such that an action that automatically
forwards to "success" (I think ForwardAction does the trick) is specified.
I haven't tried using the "." as the first character in the tile name, but
it may work. I changed it in the above snippet just in case.
> -----Original Message-----
> From: Jarrod M. Lugo [mailto:jlugo@ebidenergy.com]
> Sent: Thursday, February 13, 2003 2:14 PM
> To: Struts-User@Jakarta. Apache. Org
> Subject: Newbie Question about tiles definitions. I am lost :(
>
>
> Hello,
>
> I am trying to get tiles to work with definitions, and I am
> having a little
> trouble. How do I get either the home page or products page to show up in
> my browser?
>
> struts-config.xml:
>
> <action path="/home">
> <forward name="success" path=".home" />
> </action>
> <action path="/products">
> <forward name="success" path=".products" />
> </action>
>
>
> tiles-def.xml:
>
> <definition name=".home" path="/basicLayout.jsp">
> <put name="title" value="Home" />
> </definition>
>
> <definition name=".products" path="/basicLayout.jsp">
> <put name="title" value="Products" />
> </definition>
>
>
> basicLayout.jsp:
>
> <html>
> <body>
> <tiles:getAsString name="title" />
> </body>
> </html>
>
>
> TIA,
> Jarrod Lugo
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org