aspose file tools*
The moose likes Struts and the fly likes Problem while redirecting to action class from AJAX Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Problem while redirecting to action class from AJAX" Watch "Problem while redirecting to action class from AJAX" New topic
Author

Problem while redirecting to action class from AJAX

Ajit Amitav Das
Ranch Hand

Joined: Dec 14, 2005
Posts: 49
Hi All,

I am using the ajax framework prototype.js and calling the struts 2 action class from the javascript.I have a condition in my struts 2 action class and if that condition is satisfied i need to redirect from the current action class to a different action class without sending a response to the javascript method which made the ajax call.
But my issue is when i redirect to a different action class and from there when i try to send the result to a JSP page, i am not able to display that JSP page.The browser is not displaying the other JSP and instead remains in the same JSP page which made the ajax call.

Please let me know how to solve this problem.

Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2902
    
    1

Lets AJAX return the new action/JSP address, once you get AJAX response, use


[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
 
Don't get me started about those stupid light bulbs.
 
subject: Problem while redirecting to action class from AJAX