aspose file tools*
The moose likes Struts and the fly likes Nice URLs Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Nice URLs" Watch "Nice URLs" New topic
Author

Nice URLs

Andy Hahn
Ranch Hand

Joined: Aug 31, 2004
Posts: 225
I am a Struts developer and am used to using Struts urls such as http://www.mysite.com/action.do?linkId=123. I know I can use apache mod-rewrite to make nice or RESTful URLs such as http://www.mysite.com/action/linkId/123 or http://www.mysite.com/action/linkId/123.html. Is there a way to parse or manip URLS using servlets. If so I can then look into wiring up a custom Struts Request Processor. Thanks
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61434
    
  67

Not Struts-specific, but look into "path info" on the request.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8927
    
    9

A wild guess: Struts 2 REST Plugin


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
Andy Hahn
Ranch Hand

Joined: Aug 31, 2004
Posts: 225
I found and am now using http://tuckey.org/urlrewrite. This is way cool. I could alternatively use apache mod-rewrite but is probably overkill for what I am doing. This is a very cool tool.

Thanks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Nice URLs