domain/Forum_show.action?pg=2&forum=java
How do I rewrite that to:
domain/forum/java/pg/2
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.
Use the URL structure you like right from the start. The ability to map to any URL structure is a feature of the Servlet API.
Also, you don’t need to have an action extension (the .action part) in Struts2. In my opinion, creating bogus extensions never made sense.
Here are a few pages where I have talked about using Named Variable Pattern Matching in order to provide prettier URLs. I use this technique in all of my Struts2 apps and it yields much nicer URLs similar to your second example.