How can i get the URL from which the user came to my Struts2 Action?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Try:
You can also create a hidden field in the form and then use a if statement to check and route accordingly.
I’d recommend you use the hidden field. While it is certainly more of a hassle it is also more reliable.
The referer field can be stripped from the HTTP header by a proxy. In fact the browser isn’t required to send the referer field in the header at all.
See a good discussion here.
The above explanation is an extract from that discussion.