Thanks Craig, I posted a similar question recently asking whether it was possible to have different settings for the "default" servlet (per-context settings). For example, in some contexts, I'd like to see directory listings, in others, I'd prefer not to.
I tried overriding the default servlet, but this always threw ServletExceptions in TC4.0.1 (didn't like multiple servlets sharing the same name between global web.xml and context-specific web.xml, but always seemed to resort to global default servlet if I used a different <servlet-name> for the default servlet in the context-specific web.xml). Obviously I could write a directory-listing servlet myself if I disabled the directory listing feature globally, but I'd have problems with other static resources. I don't really understand how conflicting url mappings are handled between global and context configs either... Thanks Chris B ----- Original Message ----- From: "Craig R. McClanahan" <[EMAIL PROTECTED]> To: "Tomcat Users List" <[EMAIL PROTECTED]> Sent: Tuesday, January 29, 2002 4:20 PM Subject: Re: [TC4] Disabling JSP pages in one context only > > > On Tue, 29 Jan 2002, chris brown wrote: > > > Date: Tue, 29 Jan 2002 10:10:41 +0100 > > From: chris brown <[EMAIL PROTECTED]> > > Reply-To: Tomcat Users List <[EMAIL PROTECTED]> > > To: tomcat-user <[EMAIL PROTECTED]> > > Subject: [TC4] Disabling JSP pages in one context only > > > > Hello, > > > > I'd like to disable the "jsp" servlet for one context only. This servlet is > > declared in the "global" tomcat web.xml file. I'd like to disable it in one > > specific context only. > > > > However, I don't want to remove it from the "global" web.xml file and then > > copy it to each individual webapp's web.xml (excluding the webapp in which > > JSPs should be disabled). This is impratical, and furthermore reduces the > > webapp's portability (as the JSP servlet maps to an implementing class built > > in to Tomcat which is unlikely to be available in other deployment > > environments. > > > > If you map the "*.jsp" URL pattern to something else in a > <servlet-mapping>, you've effectively disabled JSP for that webapp ... > your settings override the container defaults. > > > Thanks for any suggestions, > > Christopher Brown > > > > Craig > > > -- > To unsubscribe: <mailto:[EMAIL PROTECTED]> > For additional commands: <mailto:[EMAIL PROTECTED]> > Troubles with the list: <mailto:[EMAIL PROTECTED]> > > -- To unsubscribe: <mailto:[EMAIL PROTECTED]> For additional commands: <mailto:[EMAIL PROTECTED]> Troubles with the list: <mailto:[EMAIL PROTECTED]>