You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Rambir Singh <rs...@agilisinternational.com> on 2007/02/19 07:55:48 UTC

why action calling is occuring twice !

 

I have populated my form bean with data object using DAO.

 

For this I have used <jsp:useBean> tag in my JSP say(My.jsp).

 

In struts-config.xml file simply I have mapped my action(MyAction.java) with
the related jsp (My.jsp) using :

 

      <action path="/ab" type="abc.MyAction"

                        scope="request">

                  <forward name="success" path="/jsp/ My.jsp" />

      </action>

 

In the above setting the Action is going to be called two times because of
that the performance of application is getting slow.

 

Thanks & Regards
Rambir Singh

Software Engineer


Agilis International
Plot 1, Udyog Vihar (Phase - IV)
Gurgaon, INDIA - 122016
_______________________________________________________________
* : +91-124-4300287/88/89 (Extn. 341) Cell: 91-9911676731
----------------------------------------------------------------------------
--------
Confidentiality Notice: 
The information contained in this electronic message and attachment(s), if
any, thereto are intended for the exclusive use of the addressee(s) and may
contain confidential and/or privileged information. If you are not the
intended recipient(s), please notify the sender immediately and destroy all
copies of this message and attachment(s), if any. Any use and/or
dissemination of the message in whole or part shall be construed as illegal
and is strictly prohibited. 
The governing law shall be "Indian Cyber Act 2000"
----------------------------------------------------------------------------
--------

 


RE: why action calling is occuring twice !

Posted by "Kalra, Ashwani" <as...@capgemini.com>.
You got it right. I was facing same problem some time back. It was
happening because of submission of form twice, with Javascript and form
action.


-----Original Message-----
From: Christopher Schultz [mailto:chris@christopherschultz.net] 
Sent: Wednesday, February 21, 2007 3:43 AM
To: Struts Users Mailing List
Subject: Re: why action calling is occuring twice !

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Rambir,

Rambir Singh wrote:
> In the above setting the Action is going to be called two times 
> because of that the performance of application is getting slow.

Are you using javascript to submit a form? If so, don't forget that you
should add a "return false;" to a submit button that uses javascript to
submit a form. Otherwise, the browser will submit the form twice.

- -chris

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFF23KH9CaO5/Lv0PARAtj0AKCz874bBAeGtECwiTfiKEcf072t7QCeLW07
o/k4zGpj6WQdL93Ht0jnGjE=
=mIEf
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient,  you are not authorized to read, print, retain, copy, disseminate,  distribute, or use this message or any part thereof. If you receive this  message in error, please notify the sender immediately and delete all  copies of this message.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: why action calling is occuring twice !

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Rambir,

Rambir Singh wrote:
> In the above setting the Action is going to be called two times because of
> that the performance of application is getting slow.

Are you using javascript to submit a form? If so, don't forget that you
should add a "return false;" to a submit button that uses javascript to
submit a form. Otherwise, the browser will submit the form twice.

- -chris

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFF23KH9CaO5/Lv0PARAtj0AKCz874bBAeGtECwiTfiKEcf072t7QCeLW07
o/k4zGpj6WQdL93Ht0jnGjE=
=mIEf
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org