• Post Reply Bookmark Topic Watch Topic
  • New Topic

Passing a request object from a jsp to a frame within the same jsp  RSS feed

 
Yagnesh Chawda
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey All,
This is kinda urgent....hope to get bac replies as alwys ASAP

I have a jsp wherein there is an embedded frame. My problem is that i need the same request object in the frame as the jsp. I tried using sessions....but all i got was null null null.

okie here is wht i did
my jsp code is as follows

First.jsp

<% session.setAttribute("requestObject",request); %>
<iframe src="FirstFrame.jsp" name="tempFrm" frameborder="0" height="100" width="800"></iframe>

the frame code is as follows

<%
HttpServletRequest req = (HttpServletRequest)session.getAttribute("requestObject");
System.out.println("req : "
+req);
%>

the SOP tht i alwys get is null.


please help me guys.......i m stuck since mrng on this
 
Jeroen T Wenting
Ranch Hand
Posts: 1847
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
a hint: your embedded JSP will be called in a separate request so won't have access to the request parameters from the primary request.
 
Yagnesh Chawda
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot fr the reply. I knw tht the embedded jsp is also having its own request object. but i want the primary request object to be available in the frame 2. Is this possible....and if it is then could u throw some light on how can it be done.
 
Stefan Evans
Bartender
Posts: 1836
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No it is not possible.
What is it you are trying to accomplish?

Putting the info you are after in the session, and retrieving it in the iframe should work. Just not for objects like "request"
[ May 30, 2006: Message edited by: Stefan Evans ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!