Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Struts 2 »

Re: specify html:form action property

Joseph McGranaghan

2007-01-17

Replies:

What if you use a DispatchAction and one path.
Either way you will need to check a parameter (or something)
to ensure the proper route

-Joe

Ilja S. wrote:
> Hello
> This could be silly question but I'm kind stuck here.
> I have 2 ActionMappings in struts config with following paths:
> path="/admin/deals"
> path="/supervisor/deals"
> Both have the forward to same jsp with form.
> All I want to do is depending on a requested mapping submit form,
> well, to its' action i.e.
> if /admin/deals page is opened then it would be <html:form
> action="/admin/deals.do"> and if /supervisor/deals url is opened then
> form would be submitted to "/supervisor/deals.do".
> Getting servletPath() from request object gives me smth like
> /layout/layout.jsp since struts Tiles is used.
>
> Thanks in advance.
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

©2008 junlu.com - Jax Systems, LLC, U.S.A.