On Thu, 3 Oct 2002, Smith, Johnathan M. wrote:

> Date: Thu, 3 Oct 2002 13:32:10 -0400
> From: "Smith, Johnathan M." <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: RE: Wrapping the controller?
>
> I does see where in the ActionServlet it calls the RequestProcessor
>

In any 1.1 version of Struts, look at the process() method of
ActionServlet:

  getRequestProcessor(getApplicationConfig(request)).process
    (request, response);

which calls getRequestProcessor() to get the right RequestProcessor
instance for the current sub-app module, then calls its process() method.

Craig


>
> -----Original Message-----
> From: David Graham [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, October 03, 2002 11:05 AM
> To: [EMAIL PROTECTED]
> Subject: RE: Wrapping the controller?
>
>
> Sounds like the best idea to me.  The servlet delegates processing to its
> RequestProcessor so it makes sense to subclass the RequestProcessor instead
> of the servlet.
>
> I think it would be pretty easy to add the logging.  Override a processor
> method put a logging statment in, call super.process*().
>
> Dave
>
>
> >From: "Galbreath, Mark" <[EMAIL PROTECTED]>
> >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >To: 'Struts Users Mailing List' <[EMAIL PROTECTED]>
> >Subject: RE: Wrapping the controller?
> >Date: Thu, 3 Oct 2002 10:33:23 -0400
> >
> >I overrode RequestProcessor for logging.
> >
> >Mark
> >
> >-----Original Message-----
> >From: Smith, Johnathan M. [mailto:[EMAIL PROTECTED]]
> >Sent: Thursday, October 03, 2002 9:49 AM
> >
> >Your right. I would like to subclass it. Should I subclass the controller
> >or
> >provide a new RequestProcessor??
> >
> >I am doing this just to add some logging lines into it
> >
> >-----Original Message-----
> >From: David Graham [mailto:[EMAIL PROTECTED]]
> >Sent: Wednesday, October 02, 2002 3:00 PM
> >To: [EMAIL PROTECTED]
> >Subject: Re: Wrapping the controller?
> >
> >
> >You don't want to wrap the controller you want to subclass it and override
> >the process method or provide your own RequestProcessor.  You could also
> >put
> >
> >a filter in front of the controller but this requires a servlet 2.3
> >compliant container.
> >
> >Dave
> >
> >
> > >From: "Smith, Johnathan M." <[EMAIL PROTECTED]>
> > >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > >To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
> > >Subject: Wrapping the controller?
> > >Date: Wed, 2 Oct 2002 14:54:25 -0400
> > >
> > >I have to wrap the controller to add some logging code into it.  Can
> > >someone
> > >please maybe send me a sample on how should I do it?
> > >
> > >
> > >--
> > >To unsubscribe, e-mail:
> > ><mailto:[EMAIL PROTECTED]>
> > >For additional commands, e-mail:
> > ><mailto:[EMAIL PROTECTED]>
> >
> >
> >
> >
> >_________________________________________________________________
> >Join the world's largest e-mail service with MSN Hotmail.
> >http://www.hotmail.com
> >
> >
> >--
> >To unsubscribe, e-mail:
> ><mailto:[EMAIL PROTECTED]>
> >For additional commands, e-mail:
> ><mailto:[EMAIL PROTECTED]>
> >
> >--
> >To unsubscribe, e-mail:
> ><mailto:[EMAIL PROTECTED]>
> >For additional commands, e-mail:
> ><mailto:[EMAIL PROTECTED]>
>
>
>
>
> _________________________________________________________________
> Join the world's largest e-mail service with MSN Hotmail.
> http://www.hotmail.com
>
>
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to