File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes Controller mappings Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Controller mappings" Watch "Controller mappings" New topic
Author

Controller mappings

Vidar x Langberget
Greenhorn

Joined: May 12, 2003
Posts: 10
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

Joined: Jan 07, 1999
Posts: 6920
You don't mention what other approaches you have tried, so can you tell us what results you get if you do:


Read about me at frankcarver.me ~ Raspberry Alpha Omega ~ Frank's Punchbarrel Blog
Vidar x Langberget
Greenhorn

Joined: May 12, 2003
Posts: 10
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
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Controller mappings
 
Similar Threads
Complete web.xml file in XML format
unknown element `xsi:schemaLocation' in web-app
Error while running the Controller Servlet
Can we use multiple Controllers in a single web-application?
calling servlet from JSP