tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "chris brown" <...@reflexe.fr>
Subject Re: [TC4] Disabling (Was: JSP pages, Now: dir. listings) in one context only
Date Tue, 29 Jan 2002 15:40:54 GMT
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" <craigmcc@apache.org>
To: "Tomcat Users List" <tomcat-user@jakarta.apache.org>
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 <dev@reflexe.fr>
> > Reply-To: Tomcat Users List <tomcat-user@jakarta.apache.org>
> > To: tomcat-user <tomcat-user@jakarta.apache.org>
> > 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:tomcat-user-unsubscribe@jakarta.apache.org>
> For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
> Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>
>
>



--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message