tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Funk <>
Subject Re: Overriding Default Servlet?
Date Fri, 18 May 2007 23:36:28 GMT
It can be extended like any other java class.  In reality - there are 
probably 2 better solutions than extending (or replacing) the Default 

1) Create a filter which does what you need then pass control to the 
default servlet. (chain.doFilter())
2) Create your own default servlet but in cases where you'd rather use 
the default servlet instead of your own - use the following code:
                      .forward(request, response);


Johnny Kewl wrote:
> Read some tomcat docs where it said one can override the default servlet... and then
it gets a little cocky and says if you cant read the code... this is not for you (pleb!) 
> So this plebian is asking... wot does override actually mean??
> I do know that if one creates a servlet and say maps it as /*.... that will effectively
block the default servlet.... is that wot override means?
> Or and this is wot I'm hoping.... does it mean one can "extend" it... as in...
>      Class MagicDefault extends Default
> Anyway if it can be overriden in true class form without a recompile of Tomcat.... it
gets very interesting?... if so please tell me how... thx

To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message