Well, there are a couple of things here. 

First, you should really use the beanclass attribute of the s:form tag.  
Stripes will then determine your action for you.  That way, if you 
decide to change your UrlBinding you won't have to search through JSP(s) 
to change your actions manually.

Secondly, you really don't need to care what the URL looks like for a 
POST.  The user should never see a POST generated URL.  What you've done 
is double the work, by assigning the event to both the form and the 
submit button.  The correct pattern is typically referred to as 
pre-actions.  So to get what you are after you might do something like 
this...
 
Use the following as a URL to get to the login screen.

http://www.domain.com/security/user/signIn

Your signIn() method simply returns a ForwardResolution to your view.  
Change your actual sign in event to something like doSignIn() and have 
that be your POST event.

<s:submit name="doSignIn" />

Hope that helps and makes sense.

Gregg


Akbar Ibrahim wrote:
> Hi All,
>
> I am upgrading my app to Stripes 1.5 and was trying out clean urls.
>
> I have an action bean with this url binding
>
> @UrlBinding("/security/user/{$event}")
>
> In the JSP, I have the following form tag
>
> <stripes:form action="/security/user/signIn" method="POST">
>       ...
>       <stripes:submit name="signIn" />
> </stripes:form>
>
> This works!
>
> 1. But what I found odd was the stripes:form tag generates a form
> element with this action url
>
> testapp/security/user
>
> (testapp being my web application context). It loses the 'signIn'
> event name and this causes the browser url to show up without the
> 'signIn' part when the form is submitted
>
> 2. Another thing that's odd was the redundancy in the form's action
> and the submit tag's name. I know I could have removed the 'signIn'
> portion from the form's action and it would still work. But I would
> like the 'signIn' event name to show up in the url.
>
> Any thought on how I can do this?
>
> Thanks,
> Akbar
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Stripes-users mailing list
> Stripes-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/stripes-users
>   


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to