Craig,
1/ If we will have one extra servlet whose main functions are init and destroy
how this concerns computer resources? And this servlet will be idle?
2/ Who is calling doGet () method of DatabaseServlet? There is no mapping for
"database" servlet. Maybe it is automatically?
Maya
"Craig R. McClanahan" wrote:
> > Are we not trading one problem with another.
> > Under what circumstances do I need to extend ActionServlet and use that ?
>
> The answer is application dependent. Basically, there are two common
> cases:
>
> * I want to initialize some application scope beans that Struts does
> not already take care of for me. You can do this by overriding the
> init() method.
>
> * I want to do some extra processing on every request flowing through
> the controller servlet. This can be done by overriding the appropriate
> processing method to add the extra logic.
>
> In general, I suspect most Struts-based apps will not need to worry about
> this. The Struts example app gets around the first problem, for instance,
> by creating a second servlet (DatabaseServlet) to do the extra
> initialization and finalization work.
>
>
> Craig