File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem getting result jsp to parent window

 
Ankur Premi
Greenhorn
Posts: 17
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 213
Eclipse IDE Java Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 17
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 213
Eclipse IDE Java Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It sounds to me like the URL is wrong. Are you sure it's correct?
 
Ankur Premi
Greenhorn
Posts: 17
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 213
Eclipse IDE Java Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic