This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes JSP and the fly likes Ajax in synchronous mode note working in Tomcat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Ajax in synchronous mode note working in Tomcat" Watch "Ajax in synchronous mode note working in Tomcat" New topic
Author

Ajax in synchronous mode note working in Tomcat

Ravi Majety
Ranch Hand

Joined: Feb 26, 2009
Posts: 59

Hi Friends,

Actually i am developing an application where i need to get the values using ajax in synchronous mode. But it is working fine in JBOSS where as it is failed in Tomcat. when i changed it to asynchronous mode, it is working fine...but i want it in synchronous mode. Please give me an solution..

David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

You're not really giving us any information: please TellTheDetails, and remember that ItDoesntWorkIsUseless!
Abimaran Kugathasan
Ranch Hand

Joined: Nov 04, 2009
Posts: 2066

And KeepItDown!


|BSc in Electronic Eng| |SCJP 6.0 91%| |SCWCD 5 92%|
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60082
    
  65

I removed the all uppercase subject. Please don't do that.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Ravi Majety
Ranch Hand

Joined: Feb 26, 2009
Posts: 59

Hi Friends..

Actually the code is as follows...




Actually the AJAX can be used either in Synchronous mode or asynchronous mode....but i want it in synchronous mode. because based on value from xmllHttp.responseText the page submission depends...

If i used in asynchronous mode (making third parameter in xmlHttp.open to true) then flag is considered as false and remaining code is getting executed and page is never submitted...

The above code is a part of my actual page. It worked fine in my JBOSS Application Server, But when i shifted to Tomcat Application Server , some times it is working fine and sometimes it was not.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Your flag value check is in the wrong place.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Ajax in synchronous mode note working in Tomcat
 
Similar Threads
JMS
issue with javascript and tiles.
Tomcat Problem
how to avoid multiple submit on form
synchronous request through Ajax