File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes Struts 2 with AJAX Call Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts 2 with AJAX Call" Watch "Struts 2 with AJAX Call" New topic
Author

Struts 2 with AJAX Call

Nagu Spartan
Ranch Hand

Joined: Jan 08, 2010
Posts: 40
From one action, I call more then one Ajax call, if I Refresh the Page, then it will redirect to the Action call.


Thanks & Regards,
Nagarajan T.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

I'm not sure what the question is.
Nagu Spartan
Ranch Hand

Joined: Jan 08, 2010
Posts: 40
In Struts 2, I call one Action. In the Page, I call another Ajax. Now the page is replaced by Div. If I press the Refresh(F5), then the Page is redirect to the Action success mentioned in struts.xml.
My Question is, whether I press F5, after that also i need to stay the current page.



David Newton wrote:I'm not sure what the question is.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

When you refresh you're taken to the original page: if you need to re-call the Ajax call to replace page contents you'll have to add some sort of state mechanism to handle the need to re-call the Ajax.
Nagu Spartan
Ranch Hand

Joined: Jan 08, 2010
Posts: 40
Can you please provide some example for the same.

David Newton wrote:When you refresh you're taken to the original page: if you need to re-call the Ajax call to replace page contents you'll have to add some sort of state mechanism to handle the need to re-call the Ajax.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Struts 2 with AJAX Call