David, Thanks for the suggestion. Unfortunately I do not have any Javascript on these links - they are plain vanilla href's:
<a href="/dm/home.do" class="navlink">Home</a> I tried logging the referer header, but they are the same for both requests. I do find it interesting that I can type the URL into the location bar instead of following the link and everything works right. This, combined with the suggestion from Lesaint that I check the <html:base> (which I haven't used on any of the pages) motivated me to try using IE instead of Firefox/Mozilla. Interestingly enough, the request only comes through once on IE. So in the end it appears to either be a Mozilla bug or something that I'm doing in my html that is causing this behavior. Unless somebody has some suggestions from past experience, I will drop this thread as it is no longer Struts related. I also won't be sending the configuration details I promised last night. Thanks for the help. Owen On Tue, 2004-11-16 at 00:11, David G. Friedman wrote: > Owen, > > If only certain actions are invoking this double submit, I recommend you log > referer pages and check them for submit buttons using Javascript. Some > people accidentally have a submit button invoke a Javascript function and > (or within it) call form.submit(). In a submit button, that often causes a > double submit. When you mentioned that sometimes the same thread and > sometimes different threads invoke it, that doesn't necessarily (from my > point of view) mean anything. It could just mean the second (i.e. double) > submit was handled by the same HTTP related thread, such as on HTTP1.1 > compliant concurrent connections. > > Regards, > David > > -----Original Message----- > From: Owen Berry [mailto:[EMAIL PROTECTED] > Sent: Monday, November 15, 2004 3:35 PM > To: Struts Users Mailing List > Subject: Actions being executed twice > > > 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] > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]