This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Struts and the fly likes Remove form fields from URL during forward Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Frameworks » Struts
Reply Bookmark "Remove form fields from URL during forward" Watch "Remove form fields from URL during forward" New topic
Author

Remove form fields from URL during forward

S Sathya
Greenhorn

Joined: Jun 05, 2009
Posts: 1
The login information entered by the user in login.jsp is validated by an action ValidateUser. It has the following entry in struts-config file.

<action path="/validateUser"
type="com.struts.actions.ValidateUser"
name="authenticateForm"
scope="page"
validate="false">
<set-property property="secure" value="true"/>
<forward name="success" path="/success.jsp" />
<forward name ="failure" path="/login.do" />
</action>

In ValidateUser class, I check the user credentials and forward the request to success or failure based on the result. My issue is when it forwards to failure, it gets forwarded correctly but the information entered in login.jsp is appended to the url as query string like www.mysite.com/login.do?username=test&password=test.

Can some please help me in removing these fields from the url? I've used post method in login.jsp to submit the form.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Remove form fields from URL during forward
 
Similar Threads
Deploying struts1.29 appl to struts 1.3.10
newbie problem - populating Action form
Struts Exception
Error: creating bean of class (HELP THE NEWBE)
Data Source trouble - javax.servlet.UnavailableException: Initializing applic (SOLVED)