I would like to make pretty URLs for my web projects on Java.
For example, I have URLs like these:
- www.mysite.com/web/controller?command=showNews&newsId=1
- www.mysite.com/web/controller?command=showNews&newsId=2
- www.mysite.com/web/controller?command=showNews&newsId=3
or
- www.mysite.com/web/user.do?action=start
- www.mysite.com/web/user.do?action=showCategory&category=videoGames§ion=AboutGames
But it isn't so pretty and userfriendly...
I want to make links like these:
- www.mysite.com/web/2011/10/04/Steve-Jobs-iPhone-5/
- www.mysite.com/web/2011/10/23/Facebook-Timeline/
- www.mysite.com/web/2012/05/25/Vladimir-Putin-Russian-President/
Сan you help me with this? How can I get it?
It's possible to use any Java frameworks or libs if it's help.
Thank you!
Update: I found solution - Spring MVC with Controller
's @RequestMapping("/Putin")
annotation for example.