You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Marco Rossi <mr...@gmail.com> on 2004/10/28 15:15:39 UTC
RequestProcessor question
I try to extend the default RequestProcessor, only to view the call sequence.
Something like this, for every method of the RP:
protected boolean processPreprocess(HttpServletRequest
request,HttpServletResponse response)
{
logger.debug("processPreprocess");
return true;
}
I saw that every method is call two times. Why?
Thanks in advance
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: RequestProcessor question
Posted by Marco Rossi <mr...@gmail.com>.
I made exactly what Joe wrote!
I'm stupid, sorry for your time.
Thank, guys.
On Thu, 28 Oct 2004 12:22:44 -0500, Joe Germuska <jo...@germuska.com> wrote:
> At 9:55 AM -0700 10/28/04, Craig McClanahan wrote:
> >The only normal situation where every method in the lifecycle would
> >get called twice is if you are doing "action chaining" -- the returned
> >ActionForward from one Action.execute() call points at a path that is
> >another Action, rather than being a JSP page or something in your view
> >tier. In such a case, the entire lifecycle will get executed again
> >for the second Action.
> >
> >Craig
> >
> >
> >On Thu, 28 Oct 2004 15:15:39 +0200, Marco Rossi <mr...@gmail.com> wrote:
> >> I try to extend the default RequestProcessor, only to view the
> >>call sequence.
> >> Something like this, for every method of the RP:
> >>
> >> protected boolean processPreprocess(HttpServletRequest
> >> request,HttpServletResponse response)
> >> {
> >> logger.debug("processPreprocess");
> >> return true;
> >> }
> >>
> >> I saw that every method is call two times. Why?
>
> Craig's explanation would describe a situation where the preprocess
> method is called twice with some time in between.
>
> If you are seeing the messages appear twice in immediate succession,
> you may have misconfigured your logger. At least, if you are using
> log4j, if you accidentally assign an appender twice, you'll get
> duplicate messages. The most frequent cause of this is explicitly
> configuring a logger to use the same appender that you are also using
> for the root appender.
>
> Apologies if this is totally off track from what you're seeing.
>
> Joe
>
> --
> Joe Germuska
> Joe@Germuska.com
> http://blog.germuska.com
> "In fact, when I die, if I don't hear 'A Love Supreme,' I'll turn
> back; I'll know I'm in the wrong place."
> - Carlos Santana
>
> ---------------------------------------------------------------------
>
>
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: RequestProcessor question
Posted by Joe Germuska <Jo...@Germuska.com>.
At 9:55 AM -0700 10/28/04, Craig McClanahan wrote:
>The only normal situation where every method in the lifecycle would
>get called twice is if you are doing "action chaining" -- the returned
>ActionForward from one Action.execute() call points at a path that is
>another Action, rather than being a JSP page or something in your view
>tier. In such a case, the entire lifecycle will get executed again
>for the second Action.
>
>Craig
>
>
>On Thu, 28 Oct 2004 15:15:39 +0200, Marco Rossi <mr...@gmail.com> wrote:
>> I try to extend the default RequestProcessor, only to view the
>>call sequence.
>> Something like this, for every method of the RP:
>>
>> protected boolean processPreprocess(HttpServletRequest
>> request,HttpServletResponse response)
>> {
>> logger.debug("processPreprocess");
>> return true;
>> }
>>
>> I saw that every method is call two times. Why?
Craig's explanation would describe a situation where the preprocess
method is called twice with some time in between.
If you are seeing the messages appear twice in immediate succession,
you may have misconfigured your logger. At least, if you are using
log4j, if you accidentally assign an appender twice, you'll get
duplicate messages. The most frequent cause of this is explicitly
configuring a logger to use the same appender that you are also using
for the root appender.
Apologies if this is totally off track from what you're seeing.
Joe
--
Joe Germuska
Joe@Germuska.com
http://blog.germuska.com
"In fact, when I die, if I don't hear 'A Love Supreme,' I'll turn
back; I'll know I'm in the wrong place."
- Carlos Santana
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: RequestProcessor question
Posted by Craig McClanahan <cr...@gmail.com>.
The only normal situation where every method in the lifecycle would
get called twice is if you are doing "action chaining" -- the returned
ActionForward from one Action.execute() call points at a path that is
another Action, rather than being a JSP page or something in your view
tier. In such a case, the entire lifecycle will get executed again
for the second Action.
Craig
On Thu, 28 Oct 2004 15:15:39 +0200, Marco Rossi <mr...@gmail.com> wrote:
> I try to extend the default RequestProcessor, only to view the call sequence.
> Something like this, for every method of the RP:
>
> protected boolean processPreprocess(HttpServletRequest
> request,HttpServletResponse response)
> {
> logger.debug("processPreprocess");
> return true;
> }
>
> I saw that every method is call two times. Why?
>
> Thanks in advance
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org