File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes Get a variable from jsp inside iframe to its parent jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Get a variable from jsp inside iframe to its parent jsp" Watch "Get a variable from jsp inside iframe to its parent jsp" New topic
Author

Get a variable from jsp inside iframe to its parent jsp

Robin John
Ranch Hand

Joined: Sep 10, 2008
Posts: 270

hi i have a iframe inside a parent jsp, 'm using struts2 how to access the child jsp's variable in parent jsp?

for ex: if i set a variable

<s:set name="X" value="Y"/>

how do i retrieve the value X in parent jsp?

Thanks in advance.


Time is what we want the most, but what we use the worst. -- William Penn
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Frames are a client side phenomenon.
To the server, they're different webpages generated from different requests.
You'll either need to store the value in a session scoped variable or use client side coding to pass the value between frames.

If you want the take the second route, let us know and we'll move this thread to our HTML/Javascript forum for you.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Robin John
Ranch Hand

Joined: Sep 10, 2008
Posts: 270

yup... i got the point ben thanks a lot for the fast repy...


javaranch rocks !!
 
Consider Paul's rocket mass heater.
 
subject: Get a variable from jsp inside iframe to its parent jsp
 
Similar Threads
Prevent opening page in new window
Retrieving Request Attribute in IFRAME
Session Time Out
Help deleteing a node at an onload event
Dynamic growth of iframe in cross domain