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 Canonical URLs - Tomcat, please ignore part of my URL! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Canonical URLs - Tomcat, please ignore part of my URL!" Watch "Canonical URLs - Tomcat, please ignore part of my URL!" New topic
Author

Canonical URLs - Tomcat, please ignore part of my URL!

Aaron Wilt
Ranch Hand

Joined: Sep 26, 2001
Posts: 49
Ok, I'm not sure if this is the correct forum but it's my best guess...

The requirement is that user can enter in whatever gibberish they want in the URL and my struts2/webwork engine will still recognize my actions and proceed. Let me give you an example.

Normal url: http://myhost/webappname/ShowProduct.action?productId=123

This url, naturally, calls the ShowProduct action sending in the product id. simple enough.

Requirement: http://myhost/webappname/Java-Ranch-Rox-Teh-Par-Tay/ShowProduct.action?productId=123

They need this url to be able to head directly to showProduct action, just as the normal URL did!

Anyone have any ideas on where I can change this? I've tried messing with web.xml for my Struts filter mapping, and changing the url-pattern to /*/* but that didn't work.

Thanks for any ideas.
Aaron
Remko Strating
Ranch Hand

Joined: Dec 28, 2006
Posts: 893
Aaron Wilt,

I think that the Struts forum is more appropriate for your question, because your problem is more related to Struts than Tomcat.


Remko (My website)
SCJP 1.5, SCWCD 1.4, SCDJWS 1.4, SCBCD 1.5, ITIL(Manager), Prince2(Practitioner), Reading/ gaining experience for SCEA,
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Canonical URLs - Tomcat, please ignore part of my URL!
 
Similar Threads
url blues
mapping wthout .do
Struts 2 - Helloworld example from Apache site
Requirment
error on making tomcat and apache work together