RE: action executing two times

2005-08-04 Thread Chatzinikos, Fotis, VF-GR Consultant
I had the same problem with my action executing twice and I tracked the
problem in the struts-config file.

When an action is of type X and a second completely different action is
of the same type X then the problem occurs...

Check your config file for actions that share the same type...

Cheers,
Fotis

-Original Message-
From: Jeremiah Johnson [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 03, 2005 6:03 PM
To: Struts Users Mailing List
Subject: Re: action executing two times

I think this has me on the right track. I was using firefox. I tried 
this with ie and it works fine. I'm clicking on a link that is an 
html:link to cause this. If I type the url the same thing happens. 
There is javascript  code that submits the page by clicking on a link 
but it's not tied to the link I am clicking. there are some links where 
href=# but they are not created by struts tags. How does src=# trigger

another submit? I'm going to start taking html out of the page till I 
figure out which piece causes this. I post back if I find anything 
interesting. Thanks!
/Jeremiah


Laurie Harper wrote:
 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.
 

-
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]



RE: action executing two times

2005-08-04 Thread Woodchuck
--- Chatzinikos, Fotis, VF-GR Consultant
[EMAIL PROTECTED] wrote:

 I had the same problem with my action executing twice and I tracked
 the
 problem in the struts-config file.
 
 When an action is of type X and a second completely different action
 is
 of the same type X then the problem occurs...
 
 Check your config file for actions that share the same type...

hihi,

this is simply not true.

only the path attribute is used to determine which action to execute. 
the type attribute has nothing to do with this.

there is something else causing your action executing twice.  it is
*not* because you have multiple actions defined with the same type
(action class).


woodchuck












Start your day with Yahoo! - make it your home page 
http://www.yahoo.com/r/hs 
 

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



RE: action executing two times

2005-08-04 Thread Chatzinikos, Fotis, VF-GR Consultant
Only the path attribute 'should' be used. I will post the config
tomorrow so you can have a look... Maybe I did something else wrong
maybe there is a bug... I do not know. I will have another look before
the post tomorrow,

Cheers,
Fotis

-Original Message-
From: Woodchuck [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 04, 2005 5:31 PM
To: Struts Users Mailing List
Subject: RE: action executing two times

--- Chatzinikos, Fotis, VF-GR Consultant
[EMAIL PROTECTED] wrote:

 I had the same problem with my action executing twice and I tracked
 the
 problem in the struts-config file.
 
 When an action is of type X and a second completely different action
 is
 of the same type X then the problem occurs...
 
 Check your config file for actions that share the same type...

hihi,

this is simply not true.

only the path attribute is used to determine which action to execute. 
the type attribute has nothing to do with this.

there is something else causing your action executing twice.  it is
*not* because you have multiple actions defined with the same type
(action class).


woodchuck












Start your day with Yahoo! - make it your home page 
http://www.yahoo.com/r/hs 
 

-
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]



RE: Re: action executing two times

2005-08-03 Thread Chatzinikos, Fotis, VF-GR Consultant
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]



Re: action executing two times

2005-08-03 Thread Jeremiah Johnson
I think this has me on the right track. I was using firefox. I tried 
this with ie and it works fine. I'm clicking on a link that is an 
html:link to cause this. If I type the url the same thing happens. 
There is javascript  code that submits the page by clicking on a link 
but it's not tied to the link I am clicking. there are some links where 
href=# but they are not created by struts tags. How does src=# trigger 
another submit? I'm going to start taking html out of the page till I 
figure out which piece causes this. I post back if I find anything 
interesting. Thanks!

/Jeremiah


Laurie Harper wrote:

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.



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



Re: action executing two times

2005-08-03 Thread Jeremiah Johnson
Fount the problem. I had img src= / in my tile. When I removed it it 
worked. Not sure why that causes problems. That didn't have anything to 
do with the link I was clicking. thanks

/Jeremiah


Laurie Harper wrote:

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.



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



Re: action executing two times

2005-08-02 Thread Laurie Harper

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]