You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Pablo Casado <pc...@absamail.co.za> on 2002/12/04 16:42:00 UTC

html:form relative action howto?

hello,

how do I do the following,

--struts config--
<action path="/x/y/myaction" ...>
 <forward name="success" path="myjsp.jsp">
</action>
<action path="/a/b/myaction" ...>
 <forward name="success" path="myjsp.jsp">
</action>
   
--myjsp.jsp --
<html:form action="whichever action that forwarded to me">

so the possible values in the html:form action can be /x/y/myaction or /a/b/myaction

Thanks.
- Pablo.








---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.423 / Virus Database: 238 - Release Date: 11/25/2002

Re: html:form relative action howto?

Posted by Patrice <pp...@nerim.net>.
Perhaps I'm misunderstanding you, but I think you can do:

<html:form action="<%= request.getRequestURI() %>">

Hope it helps
Patrice

----- Original Message -----
From: "Pablo Casado" <pc...@absamail.co.za>
To: <st...@jakarta.apache.org>
Sent: Wednesday, December 04, 2002 4:42 PM
Subject: html:form relative action howto?


hello,

how do I do the following,

--struts config--
<action path="/x/y/myaction" ...>
 <forward name="success" path="myjsp.jsp">
</action>
<action path="/a/b/myaction" ...>
 <forward name="success" path="myjsp.jsp">
</action>

--myjsp.jsp --
<html:form action="whichever action that forwarded to me">

so the possible values in the html:form action can be /x/y/myaction or
/a/b/myaction

Thanks.
- Pablo.








---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.423 / Virus Database: 238 - Release Date: 11/25/2002


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>