osdir.com
mailing list archive

Subject: action called twice in IE 8 when using different ajax submit for the same form - msg#00494

List: user-struts.apache.org

Date: Prev Next Index Thread: Prev Next Index


Here is the form from my jsp page:

1. <s:url id="email" action="contract_emailContract" />
2. <s:url id="release" action="release_releaseContract" />
3.
4. <s:form name="theForm" id="emailpdf">
5. <s:textarea name="emailTo" label="To" rows="3"
cols="49" readonly="true" />
6. <s:submit value="Release" formId="emailpdf" href="%{release}"
theme="ajax" targets="comment_result" showLoadingText="false"
indicator="loadingImage"/>
7. <s:submit value="Send e-mail" formId="emailpdf" href="%{email}"
theme="ajax" targets="email_result" showLoadingText="false"
indicator="loadingImage"/>
8. </s:form>


When using firefox, it works fine. When using internet explorer, the form is
submitted twice for the same action.
Example: if the user clicks "Release", public String releaseContract() will
be executed twice.

I saw other's form was submitted twice mostly likely because of Javascript,
but obviously this case is different.

Thanks!

--
View this message in context:
http://old.nabble.com/action-called-twice-in-IE-8-when-using-different-ajax-submit-for-the-same-form-tp26482173p26482173.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xxxxxxxxxxxxxxxxx
For additional commands, e-mail: user-help@xxxxxxxxxxxxxxxxx

Was this page helpful?
Yes No
Thread at a glance:

Previous Message by Date: click to view message preview

Re: What may cause ognl.InappropriateExpressionException warning ?

Dear all, I'm using struts 2.1.8 with displaytag 1.2 and, of course, I have the same problem. Have you found a solution ? Thank you, Norbert jctovarueda wrote: > > Lu Ying, > > I could detect the problem, it's apparently a bug from Struts 2 (XWorks). > > It seems to be that OGNL Utils setValue confuses the "d-6836677-p" > expression as substract operation, it means, the expression is evaluated > like ( d - 6836677 ) - p as mathematical operation. > > I will try to find a solution to this problem, if you have some solution, > pls write to me. > > Regards, > JC > > > luy wrote: >> >>>> params interceptor doesn't like parameters with spaces >>>> in the name (this was fixed in xwork already), to fix it, set >>>> "acceptedParamNames" to "[[\p{Graph}\s]&&[^,#:=]]*" in your param >>>> interceptor. >>> >>> Right, I am using displayTag(displaytag-1.2.jar). The parameter looks >>> like: >>> >>> https://info/ProcessBrowse.action?d-6836677-p=7 >>> >>> "d-6836677-p=7" caused the problem. Is there any way that >>> "d-6836677-p=7" can be accepted? >> >> >> Ok, I did a hack to disable warning message as a temporal solution: >> >> log4j.logger.com.opensymphony.xwork2.util.logging.commons.CommonsLogger=ERROR >> >> -- >> Lu Ying >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: user-unsubscribe@xxxxxxxxxxxxxxxxx >> For additional commands, e-mail: user-help@xxxxxxxxxxxxxxxxx >> >> >> > > -- View this message in context: http://old.nabble.com/What-may-cause---ognl.InappropriateExpressionException--warning---tp21818620p26481347.html Sent from the Struts - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@xxxxxxxxxxxxxxxxx For additional commands, e-mail: user-help@xxxxxxxxxxxxxxxxx

Next Message by Date: click to view message preview

Re: What may cause ognl.InappropriateExpressionException warning ?

try adding quotes around it 'd-6836677-p' then it will be interpreted as a string, or try to ignore it in the params interceptor. On Mon, Nov 23, 2009 at 8:27 AM, jsubei <jsubei@xxxxxxxx> wrote: > > Dear all, > > I'm using struts 2.1.8 with displaytag 1.2 > and, of course, I have the same problem. > > Have you found a solution ? > > Thank you, > > Norbert > > > > jctovarueda wrote: >> >> Lu Ying, >> >> I could detect the problem, it's apparently a bug from Struts 2 (XWorks). >> >> It seems to be that OGNL Utils setValue confuses the "d-6836677-p" >> expression as substract operation, it means, the expression is evaluated >> like ( d - 6836677 ) - p as mathematical operation. >> >> I will try to find a solution to this problem, if you have some solution, >> pls write to me. >> >> Regards, >> JC >> >> >> luy wrote: >>> >>>>> params interceptor doesn't like parameters with spaces >>>>> in the name (this was fixed in xwork already), to fix it, set >>>>> "acceptedParamNames" to "[[\p{Graph}\s]&&[^,#:=]]*" in your param >>>>> interceptor. >>>> >>>> Right, I am using displayTag(displaytag-1.2.jar). The parameter looks >>>> like: >>>> >>>> https://info/ProcessBrowse.action?d-6836677-p=7 >>>> >>>> "d-6836677-p=7" caused the problem. Is there any way that >>>> "d-6836677-p=7" can be accepted? >>> >>> >>> Ok, I did a hack to disable warning message as a temporal solution: >>> >>> log4j.logger.com.opensymphony.xwork2.util.logging.commons.CommonsLogger=ERROR >>> >>> -- >>> Lu Ying >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: user-unsubscribe@xxxxxxxxxxxxxxxxx >>> For additional commands, e-mail: user-help@xxxxxxxxxxxxxxxxx >>> >>> >>> >> >> > > -- > View this message in context: > http://old.nabble.com/What-may-cause---ognl.InappropriateExpressionException--warning---tp21818620p26481347.html > Sent from the Struts - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@xxxxxxxxxxxxxxxxx > For additional commands, e-mail: user-help@xxxxxxxxxxxxxxxxx > > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@xxxxxxxxxxxxxxxxx For additional commands, e-mail: user-help@xxxxxxxxxxxxxxxxx

Previous Message by Thread: click to view message preview

Re: What may cause ognl.InappropriateExpressionException warning ?

Dear all, I'm using struts 2.1.8 with displaytag 1.2 and, of course, I have the same problem. Have you found a solution ? Thank you, Norbert jctovarueda wrote: > > Lu Ying, > > I could detect the problem, it's apparently a bug from Struts 2 (XWorks). > > It seems to be that OGNL Utils setValue confuses the "d-6836677-p" > expression as substract operation, it means, the expression is evaluated > like ( d - 6836677 ) - p as mathematical operation. > > I will try to find a solution to this problem, if you have some solution, > pls write to me. > > Regards, > JC > > > luy wrote: >> >>>> params interceptor doesn't like parameters with spaces >>>> in the name (this was fixed in xwork already), to fix it, set >>>> "acceptedParamNames" to "[[\p{Graph}\s]&&[^,#:=]]*" in your param >>>> interceptor. >>> >>> Right, I am using displayTag(displaytag-1.2.jar). The parameter looks >>> like: >>> >>> https://info/ProcessBrowse.action?d-6836677-p=7 >>> >>> "d-6836677-p=7" caused the problem. Is there any way that >>> "d-6836677-p=7" can be accepted? >> >> >> Ok, I did a hack to disable warning message as a temporal solution: >> >> log4j.logger.com.opensymphony.xwork2.util.logging.commons.CommonsLogger=ERROR >> >> -- >> Lu Ying >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: user-unsubscribe@xxxxxxxxxxxxxxxxx >> For additional commands, e-mail: user-help@xxxxxxxxxxxxxxxxx >> >> >> > > -- View this message in context: http://old.nabble.com/What-may-cause---ognl.InappropriateExpressionException--warning---tp21818620p26481347.html Sent from the Struts - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@xxxxxxxxxxxxxxxxx For additional commands, e-mail: user-help@xxxxxxxxxxxxxxxxx

Next Message by Thread: click to view message preview

Dealing / determining lost session in Struts application

Hi, I'm tasked with killing a bug related to session management and Struts 1.3.10 in a rather conventional JEE web application. The problem is that after the session times out, the application throws a rather ugly exception, something like: 2009-11-04 11:45:46,803 ERROR de.mypackage.ipad.util.hibernate.HibernateFilter - An Exception occured. javax.servlet.ServletException: BeanUtils.populate at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1254) at org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:821) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:254) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) at... What I understand is that after the session is gone, the internal Struts processing tries to put some data into session-stored objects. It does so with help of Apache BeanUtils and I'm aware that this will crash, of course. My goal is to present a page with a clean message that the session is gone and the user has to re-enter the application. Catching the ServletException at application level (via web.xml) is a bad idea because of the rather generic exception thrown. My current take is that I need a filter which is called before the Struts servlet is called and the filter checks the session beforehand via standard Java API (isNew()). For a new session the user is redirected to a descriptive error page. This might work if the user is already in the application and takes a break, but isNew() will return true at the first entry as well which is nonsense, of course. What is the best practice to deal with this problem for a Struts 1.3 application? Or is this not a standard problem and the cause might be something different? Mit freundlichen GrÃÃen Maik Himstedt T-Systems on site services GmbH Procurement Systems Telefon/phone: +49-5361-9-44026 E-Mail: extern.maik.himstedt@xxxxxxxxxxxxx -------------------------------------------------------------------------------- Maik Himstedt Consultant BenzstraÃe 25a, 38446 Wolfsburg +49-5361-464 78-0 (Tel.) +49-5361-464 78-10 (Fax) E-Mail: maik.himstedt@xxxxxxxxxxxxx Internet: http://www.t-systems-onsite.de GeschÃftsfÃhrung: Stefan Kappe, Thomas MÃller-Braun Handelsregister: Amtsgericht Berlin HRB 51336 Sitz der Gesellschaft: Berlin
Sign up for updates to this mailing list. email:
Loading Comments...
Home | News | Patents | Sitemap | FAQ | advertise

Advertising by