tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jon Doe" <>
Subject web.xml: my default.css file does not work correctly
Date Sat, 31 Jul 2004 11:07:32 GMT
I thought I'd grasped the way the deployment descriptor works in Tomcat. But 
I've still got problems I don't understand. In summary: my default.css file 
does not work with this web.xml file:



<!-- Access to root invokes Index. -->

<!-- All URLs end .myext. These are processed by the front controller. -->

So there is a url-pattern for / -- the root URL, and there is a url-pattern 
for anything ending *myext. All this works fine. I put all the routing code 
into the file and this works like a dream. It gives me the 
benefit of putting all this logic in one file, and so I can see what is 
going on, and apply consistent security treatment to all my URLs. Great!

But the fly in the ointment is CSS (and image files too). These appear not 
to be available. How do I get round this? I have seen mention of a 'default' 
servlet in the Servlet spec, but no more details. How do you make all URLs 
that don't match your patterns 'fall through' so they can be used by 
whatever notion of webserver exists in Tomcat?

Incidentally, it would be *really* nice to have just the one servlet 
defined. Is it legal/possible to the reference to Index above removed and 
add the / to the Router servlet?

One final point. I've heard mention that it is not good form to use a / 
mapping. If not, what is the alternative?


The new MSN 8: advanced junk mail protection and 2 months FREE*

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message