This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes Struts and the fly likes Need a Solution for struts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Need a Solution for struts" Watch "Need a Solution for struts" New topic

Need a Solution for struts

john sal
Ranch Hand

Joined: Jul 30, 2010
Posts: 93
Struts is new for me and I am currently developing a sample application which uses jsp,struts.

Can someone help me in finding out the right approach for the following problem.

I am using the javascript AJAX call from the JSP page which invoke the particular Action class on the server.

Now I want that when the call returns from action class a new page should be opened displaying the data returned by the action class.

What is the appropriate way of doing this..... should i call the javascript redirect method for this and passing the data as a parameter....or should i define the page in <forwad name> tag of struts-config...... and should set the data in request parameter??
David Newton

Joined: Sep 29, 2008
Posts: 12617

Do you mean open a new window, or navigate from the current page to the new one?

In either case, why would you use Ajax to do this? Just use a link.
I agree. Here's the link:
subject: Need a Solution for struts
It's not a secret anymore!