Reputation: 34424
I have my java project web application. I am usning struts 2. Across the application , i make the action URL and submit it then response jsp is shown as result but URL does not get changed in address bar(which is expected). But one jsp when i submit the action to create the employee , i see the create customer action URL in address bar which i don't expect. I am using post method. I debugged the issue but found nothing special in request/response object for this http request?
Upvotes: 0
Views: 1079
Reputation: 692071
Seeing the address of the action you posted to in the browser address bar is expected behavior.
What you should do is use the Post-Redirect-Get pattern, so that the user can successfully refresh the page or navigate through historywithout any problem. This will also have the side-effect of displaying the URL of the action you redirect to after the creation, rather than the URL of the creation action itself.
Upvotes: 1