For example - to block all direct jsp access.
<filter>
<filter-name>ErrorFilter</filter-name>
<filter-class>net.funkman.servletutil.filter.ErrorFilter</filter-class>
<init-param>
<param-name>errorCode</param-name>
<param-value>403</param-value>
</init-param>
<init-param>
<param-name>condition</param-name>
<param-value>
${match('/.jsp$/', request.servletPath)}
</param-value>
</init-param>
</filter>http://funkman.home.comcast.net/servletutils-0.2/
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)
-Tim
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 <[EMAIL PROTECTED]>:
<url-pattern>*.jsp</url-pattern>
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)
<url-pattern>/*.jsp</url-pattern>
thanks
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
