Meaningless Drivel is fun!
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
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts-AJAX issue" Watch "Struts-AJAX issue" New topic

Struts-AJAX issue

rk sharma
Ranch Hand

Joined: Jun 25, 2011
Posts: 63

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..)


hemantha kumar k

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:
subject: Struts-AJAX issue
It's not a secret anymore!