Same problem here, A form uses a submit button and the related action is called twice. This was probably happening from the start of my project but I just found out when I tried to make some changes and then found out that the second time the incoming form is null so my app crashes if I try to so properties.getSimpleProperty (from the form bean)...
Any ideas would be greatly appriciated... Cheers, Fotis -----Original Message----- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Laurie Harper Sent: Wednesday, August 03, 2005 1:37 AM To: user@struts.apache.org Subject: Re: action executing two times Jeremiah Johnson wrote: > I have an action mapping that looks like: > <action > attribute="someForm" > name="someForm" > path="/my/path" > scope="request" > validate="false" > parameter="cmd" > type="someAction"> > <forward > name="showForm" > path="myTileDefinition"/> > </action> > > If I click the link to /my/path.do my action class sends out the > showForm then displays myTileDef. Then it executes the same action class > again. The second execution doesn't copy some of the information from > the first execution. My action class is a LookupDispatchAction so on the > second time it errors out because cmd is not defined as a parameter. If > I point my action at a regular jsp page with a tile definition in the > page it does the same thing. If I point the action at a plain old jsp > page it executes once. Why does this execute more then once? how do I > write code around this problem? I'm using struts 1.2.7. Thanks! > /Jeremiah How are you invoking the action (from an HTML link? form submission? directly by typing the URL into the address bar?); is there any Javascript involved? Does the response contain any suspect hrefs (for example <img/> tags with src="#") that might be triggering the second request? Using something like tcpflow to watch what's going over the wire can help figure out where your 'mystery' request is coming from. If that doesn't help, I'd suggest posting any HTML that invokes the action as well as the HTML it produces as a resonse. L. -- Laurie, Open Source advocate, Java geek and novice blogger: http://www.holoweb.net/laurie --------------------------------------------------------------------- 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]