On Mon, 2004-11-15 at 15:46, Matt Bathje wrote:
> Owen Berry 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.
> > 
> 
> 
> Owen - I had this problem right after I upgraded to Tomcat 5. It turned 
> out that our webapp was being deployed twice, once as "/" and once as 
> "/pub". I had to turn off autoDeploy and deployOnStartup in my tomcat 
> configs, and it fixed the problem.
> 
> If you are able to execute some actions that don't exhibit this behavior 
> than it is a long shot, but something to look for anyway I guess.
> 
> Matt
> 

Matt,

Thanks for the suggestion. I actually did have my application deployed
in this fashion at one stage. Just to make sure I had not broken
something when doing that (or undoing it), I made a fresh install of
Tomcat, but no luck on the problem. With your suggestion in mind, I just
did a double check of Tomcat and the default root is still in place.

Owen



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

Reply via email to