• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem while redirecting to action class from AJAX

 
Ajit Amitav Das
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2907
1
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Lets AJAX return the new action/JSP address, once you get AJAX response, use

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic