tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Funk <>
Subject Re: <url-pattern>/*.jsp</url-pattern>
Date Thu, 07 Oct 2004 13:24:58 GMT
In that case look at ErrorFilter from my Servlet Utilities. It allows you to 
set an error based on an EL expression. (The utilities depend on tomcat 5).

For example - to block all direct jsp access.

        ${match('/.jsp$/', request.servletPath)}

But a better way to block direct jsp access is to move the JSP files under a 
WEB-INF (or a subdirectory in WEB-INF)


Fred Blaise wrote:

> Well, I am developping a site I would like to block entry to.
> However, my .css file is also in this directory, so having a pattern of /* also
> blocks access to my css, making the site very ugly to see.
> I have tried the following, with no result:
> .jsp (no result), jsp (no result), *.jsp (app fails to start)
> I haven't tried such thing such as regex.. I haven't seen that anywhere... Woudl
> something like /\.jsp$\ work?
> Thanks
> Fred
> Quoting Peter Johnson <>:
>>But I think that you'll find that this is defined in the core web.xml to
>>go to the JSP servlet.
>>What are you trying to achieve?
>>On Thu, 2004-10-07 at 15:22, Fred Blaise wrote:
>>>any possible way i can achieve this in my web.xml ? Bc it wont the app
>>>won't start with this... (tomcat 5.0.28)

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

View raw message