tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Heller" <th.hel...@mx4k.com>
Subject tomcat match *.jsp first everything else to my servlet?
Date Fri, 18 Oct 2002 10:22:08 GMT
hi there,

im trying to find a standard catalina/tomcat setup so that every *.jsp is
handled by the jasper jsp servlet and "/*" on my servlet context path is
handled by my servlet. as soon as i put

<servlet-mapping>
<servlet-name>jsp</servlet-name>
<url-pattern>*.jsp</url-pattern>
</servlet-mapping>

<servlet-mapping>
<servlet-name>my</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>

into my web.xml _every_ request is mapped to my servlet. i'm using
requestdispatcher.forward after my servlet processed the request and forward
to a jsp page. but .. as /* matches the jsp file the request gets into my
servlet again. causing a stack overflow after some time.

well i could write my own Wrapper and tell tomcat in the server.xml to use
it instead of StandardContextMapper but i wonder if there isnt a more
"correct" way cause i dont think that other servlet containers will allow me
to add a custom mapper?

thanks,
thomas


--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message