Good suggestion. I didn't think this was happening as there are
different thread descriptors in my logs, but I thought I would try
something to test this theory, just in case. Printing something out on
System.out should verify that this is not a logging problem, right?
Well, it still looks like the action is being called twice - printed the
date and time and a message out twice for each execution.

Something interesting that I did note is that about 1 in 20 times the
action is only called once. Almost looks like a race condition.

Thanks for the suggestion. Will post more details of the configuration
files tomorrow morning (have to dash now), but it really is not much
more than what I detailed in my original email - the action is currently
a stub for future use.

Owen

On Mon, 2004-11-15 at 16:59, Hubert Rabago wrote:
> There's been a case like this before reported here on the user list
> where the person thought the action was executing twice, when in fact
> the log was just being called twice because of the logging
> configuration.
> Make sure that this isn't what you're seeing.
> If that doesn't do it, maybe posting your actual link, the web.xml
> mapping, and the action code would help.
> 
> 
> On Mon, 15 Nov 2004 15:35:10 -0500, Owen Berry <[EMAIL PROTECTED]> wrote:
> > Hi there,
> > 
> > I'm having a problem where certain actions are being executed twice when
> > a user follows a link. I'm hoping somebody has some input on this, or
> > some suggestions on how I can figure it out.
> > 
> > I'm running Struts 1.1, Tomcat 5.0.28, J2SE 1.4.2_05 and Fedora Core 2.
> > 
> > As far as I can see this only happens on http posts, not gets. I thought
> > I had also narrowed it down to only happening on actions that are
> > straight off the application context (/app/action.do), but I've managed
> > to find some actions that are off the root of the application but do not
> > exhibit this behavior. I'm going directly to Tomcat on port 8080 to
> > avoid any problems with Apache connectors and the like.
> > 
> > The simplest example I can give of this is:
> > 
> > <action path="/home"
> >        type="actions.WelcomeAction">
> >    <forward name="success" path="/WEB-INF/pages/home.jsp"/>
> > </action>
> > 
> > WelcomeAction logs the fact that it was executed and then:
> > 
> > return (mapping.findForward("success"));
> > 
> > When I look in the log file the message gets logged twice. Most of the
> > time the action is being executed by two different threads, but I have
> > seen the same thread handle both executions.
> > 
> > Initially I thought it was possible that some part of my code was
> > calling the execute again, but if I create a stack dump within the
> > action both stack dumps are identical except for time stamp and thread.
> > 
> > I have my own RequestProcessor class that overrides the standard Struts
> > one in order to perform authorization checking, but if I remove it from
> > the Struts config file I still get the same results.
> > 
> > Thus far I haven't been able to replicate the problem using a standard
> > servlet.
> > 
> > Any suggestions on where I can start looking? BTW, I'm not in a position
> > to upgrade to Struts 1.2.x at this stage.
> > 
> > Thanks,
> > Owen Berry
> >



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

Reply via email to