Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Aaron Wilt
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 893
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Aaron Wilt,

I think that the Struts forum is more appropriate for your question, because your problem is more related to Struts than Tomcat.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic