This falls in the category "I want to pass parameters along a redirecting forward, but I don't know how."
 
I have the same problem when:
 
- a user adds a new contact to a group in an hypothetical addressbook.
- on success a list of all contacts in that group is shown.
- to avoid double/triple-submissions due to reloads, I want to use a redirect, but then I cannot add/set a groupId=42.
- ugh.
 
The only solution I can think of - but havent tested it yet - is redirecting using response.sendRedirect() to a resolved forward url from the Action class.  (The <html:link forward="..."/> tag contains code for the resolving logic.)
 
 
Does anyone know if redirecting from an Action class works?
 
 
Renzo
-----Original Message-----
From: Guus Holshuijsen [mailto:[EMAIL PROTECTED]]
Sent: vrijdag 20 juli 2001 12:48
To: [EMAIL PROTECTED]
Subject: HTTP requests in struts-config.xml

I would like to use the following request in a forward of an action in my web application's struts-config.xml file:
"/doorman.do?action=lfadm.list&ci=0"
But when I put in:
<forward name="lfadm"  path="/doorman.do?action=lfadm.list%26ci=0" redirect="true"/>
I get XML parser errors when Tomcat starts up.
 
And when I put in:
<forward name="lfadm"  path="/doorman.do?action=lfadm.list%26ci=0" redirect="true"/>
I find that Struts does not interpret this as a parameter 'action' with value 'lfadm.list' and a parameter 'ci' with value '0' but as a parameter 'action' with value 'lfadm.list&ci=0' (note the change of %26 into &).
 
The questions I have:
1. Is Struts designed to handle these kind of requests in a forward in struts-config.xml?
2. If the answer to 1 is yes: am I doing something wrong, or did I run into a Struts bug?
3. If the answer to 1 is no: What's another option?
 
Regards,
Guus
 
Guus Holshuijsen, Videtur
Horsten 1, unit 1.18
5612 AX Eindhoven
T:+31-40-2450214  F:+31-40-2939343  M:+31-6-25077204

Reply via email to