tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Phillip Morelock <subscripti...@phillipmorelock.com>
Subject Re: Help needed on new child window is treated in new session by JavaScript from parent window
Date Sun, 02 Jun 2002 23:25:47 GMT
> I'm not sure to say this is bug in Tomcat4.x,
> but I'm facing it with Tomcat4.x(all versions above  4).

it is more likely:
1.  This is a bug in the browser, not sending the cookie.
or
2.  Maybe you're not waiting long enough for the session to get associated?
Maybe you need to explicitly begin the session in the jsp that generates the
window-opening javascript.  And then maybe the javascript should be delayed
by a second or something to ensure that the session has been created.  Does
your function fire onload??  If so, make your call

onload="setTimeout('show()', 1000);"

or whatever -- can't remember javascript right now.

cheers
fillup


On 6/2/02 4:55 AM, "Yaman Kumar" <yamank@nous.soft.net> wrote:

> Hi,
> I'm not sure to say this is bug in Tomcat4.x,
> but I'm facing it with Tomcat4.x(all versions above  4).
> 
> My application is loaded in a parent window there user logs into application
> and
> in servlet I validate the user login info and keep so much information in
> session
> ( say id is x)and a new page is supplied by server and loaded in the parent
> window
> and parent window opens another window(child) using JavaScript
> that will hide all browser controls in child window (please look at the code
> that is
> in page loaded in parent window).
> 
> function show(){
> childWindow1=window.open("myapp/userinfo.jsp?name=<%
> =userName%>","child1","HEIGHT="+hit+",WIDTH="+wid+",top=0,left=
> 0,status=YES,scrollbars=YES");
> }
> 
> Problem: The child window that is opened from parent is not "ALWAYS"
> participating in the
> parent session (id:x).
> As I'm finding out the child window session as ( id:Y) in userinfo.jsp,
> Actually
> i would like to get the information that is stored in parent session (x).
> 
> "SOME TIMES both PARENT AND CHILD WINDOWS are participating in the SAME
> SESSION but not always".
> 
> And I tried to pass the parent session id to a other page that loads in
> child window
> using querystring, even that is not worked out as HttpServletContext can't
> give
> the HttpSession object using session id. Servlet 2.3 spec returns null
> object if we
> access
>  HttpSession parentSession= sessionContext.getSession( anysessionid);
>  //here parentSession is null
>  // (*** TOMCAT4 servletAPI says the above method returns null and in
> future
>  // this  method will be removed ***).
> 
> Then the information that is stored in Parent window session (id: x) is
> never get back.
> 
> Is it really bug in tomcat4.x other wise how come some times both windows
> are participating
> in same session?
> 
> Can any one jumped into this scenario with tomcat4.x ?
> 
> Many Thanks,
> rayaku
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>
> 


--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message