Reputation: 5327
In my site I am showing games in one jsp page. I am passing game id from one jsp
<a href="playgame?id=<s:property value="id"/>">
after fetching game from action it is showing following url in address bar
mysite.com/playgame?id=tskaqnrg9p
I want to display url with game name as follows
mysite.com/playgame/gamename
How to do it
I am using struts2 framework
Upvotes: 1
Views: 1457
Reputation: 160291
You can use the REST plugin as mentioned, or use a pattern-matching action mapper:
http://struts.apache.org/2.x/docs/wildcard-mappings.html#WildcardMappings-AdvancedWildcards
(Or the NamedVariablePatternMatcher.)
Upvotes: 1