struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anand Patil" <>
Subject RE: Query String for tiles
Date Fri, 06 Feb 2004 20:16:22 GMT
I assume you want to pass the query string "remember=test001" to
"/pages/time_inputeffort_body_nested.jspf". One way I can think of is
put the "remember=test001" as a request attribute in the logic of

try reading the attribute directly from the request, since tiles does
"include" , you share the same request. So you could probably use
request.getAttribute()" ;

If that does not work use the tile controller concept 

Put a controller on the definition "tiles.self.effort". Your definition
modifies as 

<definition name="tiles.self.effort" extends="tiles.full.layout"
<put name="head.title" value="/pages/title.jspf"/> 
<put name="body" value="/pages/time_inputeffort_body_nested.jspf"></put>

In your struts-config.xml add this.
<action path="/tilecontroller" type="<yourclasswhichextendstileaction"/>

Make sure ur tile controller extends from TilesAction

In your tilecontroller guy u can get the attribute from the request and
put in the tilecontext and in your jsp for the tile you can use
<tiles:useattribute/> look @ tiles documentation to figure how to use
the tag. Then get that value and pass it to your jsp include via
<jsp:include/> tag. 



-----Original Message-----
From: news [] On Behalf Of Wayne Kidd
Sent: Friday, February 06, 2004 11:44 AM
Subject: Query String for tiles

Is it possible to attach a query string to a tiles forward.

my struts-config.xml has an entry like

<action path="/login" name="login" 
type="com.rdlogic.struts.control.LoginAction" >
<forward name="startapp" path="tiles.self.effort"></forward>
<forward name="userForInput" path="tiles.self.effort"></forward>
<forward name="showlogin" path="tiles.login"></forward> </action>

My Tiles-defs.xml has an entry like

<definition name="tiles.self.effort" extends="tiles.full.layout"> <put
name="head.title" value="/pages/title.jspf"/> <put name="body"

I want the net result of forward "startapp" to have a query string like


I want the remember to be dynamically settable (during the execution of 
the LoginAction code I want to pick whether it is "test001" or "test002"

Anybody know a way.


To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message