aspose file tools*
The moose likes Struts and the fly likes problem getting result jsp to parent window Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "problem getting result jsp to parent window" Watch "problem getting result jsp to parent window" New topic
Author

problem getting result jsp to parent window

Ankur Premi
Greenhorn

Joined: Aug 07, 2010
Posts: 17
I am sending data from a popup to action class and then after fetching some data from database i am returning to action class and after returning success to a result jsp page. But i am unable to open the result jsp page in the parent window. It opens in the popup only. Please help me.

I am Using struts 2
Richard Golebiowski
Ranch Hand

Joined: May 05, 2010
Posts: 213

The way I do this is to have a JavaScript function in my parent that I call from the pop-up. The values entered in the pop-up are passed to the function. The pop-up closes and the function executes the action with the passed in parameters. The result is now displayed in the parent.
Ankur Premi
Greenhorn

Joined: Aug 07, 2010
Posts: 17
Thanks for replying.

Actually i am making a filter screen popup. User enters the values in the fields. Can you please help me in finding the mistake in the code.

through onblur of my textfield i am creating a hidden form field in the parent window.






and onclick of a submit button...i am doing





But the parent window is showing an error, page cannot be found. URL is showing the action in it. and processing goes on in the console.


Please help me.
Richard Golebiowski
Ranch Hand

Joined: May 05, 2010
Posts: 213

It sounds to me like the URL is wrong. Are you sure it's correct?
Ankur Premi
Greenhorn

Joined: Aug 07, 2010
Posts: 17
I am giving the action that is mapped in the struts.xml file. The parent window should go to the corresponding action class. And should perform the operation.
Richard Golebiowski
Ranch Hand

Joined: May 05, 2010
Posts: 213


But the parent window is showing an error, page cannot be found. URL is showing the action in it. and processing goes on in the console.


If the pop-up closed and the parent window is now executing the action that is shown in the URL and you see the action executing in the console but you end up with the "page cannot be found error" then that sounds to me like it cannot find the JSP page that should be returned by the result of the action.
 
wood burning stoves
 
subject: problem getting result jsp to parent window