my dog learned polymorphism*
The moose likes Struts and the fly likes Struts-AJAX issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts-AJAX issue" Watch "Struts-AJAX issue" New topic
Author

Struts-AJAX issue

rk sharma
Ranch Hand

Joined: Jun 25, 2011
Posts: 50

Hi,
I have a JSP which is to be modified (by means of its content ) for different action using AJAX. I am very much happy in doping this using AJAX.
But the issue is that, How to get a value of a variable from a action class to my AJAX function. I want to set a value in struts action class and get back at the same time i put the response in JSP using AJAX.
( * setAttribute(),getAttribute() methods will work only while communicating jsp pages and/or servlets. Please note that the page is not going to be reloaded. i have to get the value inside javascript function..)


Regards,

RK
hemantha kumar k
Greenhorn

Joined: Apr 20, 2010
Posts: 27

Ajax is used to make the request Asynchronously from Client side to Server Side, and your requirement is Sending the data from Server side to Client side Asynchronously, so Ajax is not compatible for this scenario, Use comet programming solve your problem
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Struts-AJAX issue
 
Similar Threads
pass <bean:write> to a function
Ajax with Struts - Loading the lookup values in drop down
problem in implementing the AJAX with Struts
Modifing database object using javascript
AJAX-JQuery-Struts getJSON function data issue