pradeepp12
asked on
Request object from parent to child jsp
How to forward Request object from parent to child in jsp ... I'm using window.open
Tried all kind of options but with no result :)
Tried all kind of options but with no result :)
ASKER
No.
Actually i have some objects(java beans) already in the request parameter of the parent jsp. Now i want all those Objects in my Child window so that i can use ${requestScope.mybean.valu e} and display the result in the child window
thanks
Actually i have some objects(java beans) already in the request parameter of the parent jsp. Now i want all those Objects in my Child window so that i can use ${requestScope.mybean.valu
thanks
You will not be able to get it directly as the popup is a new window and hence a new request object is created.
ASKER
Any suggestion that you may have for this problem ? Is there any other way that i can pass these objects to the child window?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
If you can get the bean object using the fields in the parent window you can get that. Other wise if you just want one or two values in the bean you pass those as parameters appended to URL, to the popup window
ASKER
"If you can get the bean object using the fields in the parent window", I didn't get this part? Can i have code snippet ?
AND
you have any code snippet for passing object through session in window.open ?
Thanks a lot
AND
you have any code snippet for passing object through session in window.open ?
Thanks a lot
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
> If you can get the bean object using the fields in the parent window
say you have thje employee details in the current page like name, empid etc. and your bean like
public class EmployeeBean{
private String name;
private String id;
...
...
also you have getters and setters.
}
then when you open the popup, if the number of parameters is less and will not exceed the max url length then you can pass it them as query string and in the popup get the values from request and create a new object of the Employee and set the values
say you have thje employee details in the current page like name, empid etc. and your bean like
public class EmployeeBean{
private String name;
private String id;
...
...
also you have getters and setters.
}
then when you open the popup, if the number of parameters is less and will not exceed the max url length then you can pass it them as query string and in the popup get the values from request and create a new object of the Employee and set the values
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you so much for all the replies....
as suggested, I will use session and will make sure that i will make it null after i use it..
Thanks once again
as suggested, I will use session and will make sure that i will make it null after i use it..
Thanks once again
OR
is it like you want are setting something in the request as an attributein parent window(jsp) which you want to use in the popup(jsp)?