wood burning stoves*
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

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

Joined: Jan 10, 2002
Posts: 60781

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

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

Joined: Oct 29, 2001
Posts: 8836

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.

With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: Nice URLs
Similar Threads
How to easily test a Struts Action?
html buttons in struts
Failed to establish chain problem
pagination and jsp tags
Struts jsps in WEB-INF