I suppose you could submit via javascript, setting the entire url on the form.
document.forms[0].action = 'entireURLgoeshere'; document.forms[0].submit(); That's not really a solution, just an ugly work-around. On Tue, Feb 1, 2011 at 6:45 AM, Agoston Bejo <bejo...@yahoo.com> wrote: > > > Thanks Chris, > > > the problem is that there are other s:submit buttons on the form the action > attributes of which point to actions in the current namespace. Changing the > namespace of the form would mess that up and I would end up with the same > problem. > > I've tried it out, and there's really no "namespace" attribute for the > s:submit > element, although obviously that would be the most sensible solution. > > Any other ideas how one could solve this? > > > Thanks, > Agoston > > > ----- Original Message ---- > From: Chris Pratt <thechrispr...@gmail.com> > To: Struts Users Mailing List <user@struts.apache.org> > Sent: Tue, February 1, 2011 8:55:32 AM > Subject: Re: <s:submit action="ACTION-IN-ANOTHER-NAMESPACE"> > > It should have a namespace attribute, like all the other tags with action & > method attributes, but I don't see it in the documentation. You might give > it a try, just in case it's just un-documented. > > <s:submit action="MyAction" namespace="/p"/> > > Otherwise, the more common way would be: > > <s:form action="MyAction" namespace="/p"> > <s:submit/> > </s:form> > > (*Chris*) > > On Mon, Jan 31, 2011 at 10:59 PM, Agoston Bejo <bejo...@yahoo.com> wrote: > > > > > > > Hi! > > > > I would like to specify the "action" attribute of an <s:submit/> such > that > > it > > points to an action in a namespace other than which the jsp is in: > > > > struts.xml: > > <package name="p" extends="root" namespace="/p"> > > ... > > <action name="MyAction" class="package1.MyAction"> > > ... > > </package> > > > > > > /p/p2/x.jsp: > > > > <s:form action="..."> > > ... > > <s:url action="../MyAction"/> <%-- WORKS, but not an s:submit --%> > > > > <%-- NEITHER OF THESE WORKS: --%> > > <s:submit action="../MyAction"/> > > <s:submit action="/p/MyAction"/> > > <s:submit action="MyAction"/> > > > > > > Any ideas? > > > > Thanks, > > Agoston > > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > > For additional commands, e-mail: user-h...@struts.apache.org > > > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > >