How can i redirect www.mysite.com/12345 to www.mysite.com/action?id=12345 using struts2?
How can i redirect www.mysite.com/12345 to www.mysite.com/action?id=12345 using struts2?
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.
I use URL rewriting to get these kind of flexible mappings working (though you could probably do it in struts proper, possibly with your own interceptor or something). There’s a great little project, urlrewritefilter that gets the job done. In your URL rewriting configuration you’d have a rule like:
Have a look at the manual to see if it is what you are looking for.