The problem is the "/resources" entry. If you map it to the default servlet, the directory name itself will not be part of the path, but a "root" for the actual one, so the default servlet will understand you want to get the path following "resources", and it is "". I guess the same will happen with the contents of the directory.

It seems that the default servlet cannot be configured to serve files from an alternative directory.

You could try one of the following:
- Create your own servlet for "resources" requests. Perhaps you could subclass DefaultServlet, or use it in any other way.
- Implement a Filter that redirects any request not to "resources" to your own servlet, and let the default configuration to work for the resources directory.




Samuel Le Berrigaud wrote:

Thanks for your help,

I'll do it another way I think and I'll probably come back on that problem later on.

SaM

Tim Funk wrote:

Then there is either
- a bug in tomcat
- a config error (most likely) but don't know what could be the culprit

I never heard of this before. Seems quite odd.

-Tim

Samuel Le Berrigaud wrote:

Yes

Tim Funk wrote:

[Need more coffee]

Does that mean that http://myserver/context/resources is serving a dir listing of the contents from http://myserver/context ?
(instead of /context/resources)


-Tim





--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to