• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Controller mappings

 
Vidar x Langberget
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
I'm using my own MVC framework, and it works except for one thing. I want to map the controller servlet to both .cka files and the root of my domain:
www.mydomain.com
www.mydomain.com/
My current config looks like this:

This doesn't work with the root of the domain of course, but I've been unable to find a solution that works with both. Any suggestions?
Vidar
 
Frank Carver
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You don't mention what other approaches you have tried, so can you tell us what results you get if you do:
 
Vidar x Langberget
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Frank: That solution doesn't work completely.. The request is sent to the controller, and it forwards the request to the correct view, but the problem is images and style sheets. I have them stored in resources directory under the root of the webapp. So when a view requests an image, the request is sent to the controller. Could I use regular expressions to ensure that requests for files with specific endings don't get sent to the controller?
I did find a way that works, by adding an index.jsp file to the root and forwarding the request to the controller from the jsp file, but I would prefer if I could to it with url mathcing.
Thanks!
Vidar
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic