File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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
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: 60059
    
  65

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: 8710
    
    6

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
 
Similar Threads
Struts jsps in WEB-INF
html buttons in struts
How to easily test a Struts Action?
Failed to establish chain problem
pagination and jsp tags