You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Nancy Crisostomo Martinez <na...@correo.uqroo.mx> on 2002/03/02 20:56:20 UTC

Re: session object [urgent!]

I have found a kind of bug or I don't know what....
I tried to access to the session's attributes, with another servlet-engine and it works perferct!
So... I think Tomcat 3.3 (I'm using) has a bug or maybe it is a cause of a bad configuration because the
track is lost....

What do you think about it?
Does any of you have the same problem with sessions?



Nancy Crisostomo Martinez wrote:

> Hi everybody!
>
> I need your help..
> I'm trying to track some attributes I added to the session object, but I
> can't...
>
> I have an html file (main.htm) which opens a new window browser
> (validate.jsp) when you press a button to access to one service...
> Then when the user is validated in the validate.jsp file, I added two
> attributes to the session object like this:
>
>      .......
>      <%
>      if (validUser(id_Usuario)){
>         session.setAttribute("numero",id_Usuario);
>         session.setAttribute("edad",num);
>      .......
>
> and finally the window is closed and another new window is opened (
> portal.jsp ).
>
>      %>
>                  <script>
>
> window.open("portal.jsp","","top=0,left=0,width=791,height=520,scrollbars=yes,resizable=yes,status=yes")
>
>                      return eval('close()')
>                  </script>
>      <%
>      }
>      %>
>
> The portal.jsp file is formed by frames:
>
>           <HTML>
>           <FRAMESET rows="75,250*" frameborder="0" border="0"
> framespacing="0">
>                   <FRAME name="FrameArriba" scrolling="NO" noresize
> marginwidth="0" marginheight="0" SRC="arriba.htm" frameborder="0">
>
>                  <FRAMESET cols="128,127*"  border="0" framespacing="0"
> frameborder="0">
>                          <FRAME name="FrameIzquierda" scrolling="NO"
> marginwidth="0" marginheight="0" noresize SRC="izquierda.jsp"
>           frameborder="NO">
>                          <FRAME name="FrameServicio" marginwidth="0"
> marginheight="0" noresize SRC="blanco.jsp" frameborder="NO" >
>                  </FRAMESET>
>
>                  <NOFRAMES>
>                        Su browser no acepta Frames.
>                  </NOFRAMES>
>           </FRAMESET>
>           </HTML>
>
> In the left frame (FrameIzquierda) I have a jsp file (izquierda.jsp)
> that reads the new session's attributes (numero,edad) and they are
> displayed perfectly when the
> portal.jsp file is opened. Moreover, in the right frame I put a jsp file
> (blanco.jsp) that also reads the attributes 'id' and 'ag' and they are
> perfectly displayed too.
> But the problem becomes when I click a link placed in the izquierda.jsp
> file :
>
>      .....
>      <a href="top.jsp">test</a>
>      or
>      <a href="top.jsp" target="FrameServicio" >test</a>
>      .....
>
> The top.jsp file also reads the attributes (numero, edad)...
> In both cases the session's attributes are not displayed, they only
> return a "null" value,  and the session id (session.getId()) is
> differtent because when the link is
> pressed, a new session object is created....so.. I don't know how to fix
> this....
> I really need to get the two attributes I stored previously in the
> session object...
>
> Could you please help me???
> I'm desperate!!
>
> Thank you in advance..
> Nancy.
>
> --
> To unsubscribe:   <ma...@jakarta.apache.org>
> For additional commands: <ma...@jakarta.apache.org>
> Troubles with the list: <ma...@jakarta.apache.org>


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


RE: session object [urgent!]

Posted by Huy K Dung <hd...@lending4all.com>.
I have exactly the same problem. I am working on a solution but still no
luck. This problem happens to me only when i am using Netscape 4.79. IE 5.5
and Netscape 6.2.2 are OK.

I find that IE 5.5 creates a new session in a new window when IE 5.5 is run
by clicking on its icon. However, if a new IE 5.5 window is opened by
javascript from another IE 5.5 window, the same session is maintained.

As for Netscape 6.2.2, it doesn't matter if a new windows is opened by
clicking on its icon or by javascript from another Netscape window.

As for Netscape 4.79, the session is also maintained if another window is
opened ny clicking on its icon. However, if a new window is opened by
javascript from another window, the new window is able to access the session
to render the info for display but when an action is done on the new window,
a new session kicks in and the old session is unknown. Somehow, Netscape
4.79 pops up a new window as a different process.

Please HELP!!! I hope my description of the problem is clear enough.

-----Original Message-----
From: Nancy Crisostomo Martinez [mailto:nancycm@balam2.cuc.uqroo.mx]
Sent: Saturday, March 02, 2002 02:56 PM
To: Tomcat Users List
Subject: Re: session object [urgent!]


I have found a kind of bug or I don't know what....
I tried to access to the session's attributes, with another servlet-engine
and it works perferct!
So... I think Tomcat 3.3 (I'm using) has a bug or maybe it is a cause of a
bad configuration because the
track is lost....

What do you think about it?
Does any of you have the same problem with sessions?



Nancy Crisostomo Martinez wrote:

> Hi everybody!
>
> I need your help..
> I'm trying to track some attributes I added to the session object, but I
> can't...
>
> I have an html file (main.htm) which opens a new window browser
> (validate.jsp) when you press a button to access to one service...
> Then when the user is validated in the validate.jsp file, I added two
> attributes to the session object like this:
>
>      .......
>      <%
>      if (validUser(id_Usuario)){
>         session.setAttribute("numero",id_Usuario);
>         session.setAttribute("edad",num);
>      .......
>
> and finally the window is closed and another new window is opened (
> portal.jsp ).
>
>      %>
>                  <script>
>
>
window.open("portal.jsp","","top=0,left=0,width=791,height=520,scrollbars=ye
s,resizable=yes,status=yes")
>
>                      return eval('close()')
>                  </script>
>      <%
>      }
>      %>
>
> The portal.jsp file is formed by frames:
>
>           <HTML>
>           <FRAMESET rows="75,250*" frameborder="0" border="0"
> framespacing="0">
>                   <FRAME name="FrameArriba" scrolling="NO" noresize
> marginwidth="0" marginheight="0" SRC="arriba.htm" frameborder="0">
>
>                  <FRAMESET cols="128,127*"  border="0" framespacing="0"
> frameborder="0">
>                          <FRAME name="FrameIzquierda" scrolling="NO"
> marginwidth="0" marginheight="0" noresize SRC="izquierda.jsp"
>           frameborder="NO">
>                          <FRAME name="FrameServicio" marginwidth="0"
> marginheight="0" noresize SRC="blanco.jsp" frameborder="NO" >
>                  </FRAMESET>
>
>                  <NOFRAMES>
>                        Su browser no acepta Frames.
>                  </NOFRAMES>
>           </FRAMESET>
>           </HTML>
>
> In the left frame (FrameIzquierda) I have a jsp file (izquierda.jsp)
> that reads the new session's attributes (numero,edad) and they are
> displayed perfectly when the
> portal.jsp file is opened. Moreover, in the right frame I put a jsp file
> (blanco.jsp) that also reads the attributes 'id' and 'ag' and they are
> perfectly displayed too.
> But the problem becomes when I click a link placed in the izquierda.jsp
> file :
>
>      .....
>      <a href="top.jsp">test</a>
>      or
>      <a href="top.jsp" target="FrameServicio" >test</a>
>      .....
>
> The top.jsp file also reads the attributes (numero, edad)...
> In both cases the session's attributes are not displayed, they only
> return a "null" value,  and the session id (session.getId()) is
> differtent because when the link is
> pressed, a new session object is created....so.. I don't know how to fix
> this....
> I really need to get the two attributes I stored previously in the
> session object...
>
> Could you please help me???
> I'm desperate!!
>
> Thank you in advance..
> Nancy.
>
> --
> To unsubscribe:   <ma...@jakarta.apache.org>
> For additional commands: <ma...@jakarta.apache.org>
> Troubles with the list: <ma...@jakarta.apache.org>


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>

Re: session object [urgent!] [solution]

Posted by Nancy Crisostomo Martinez <na...@correo.uqroo.mx>.
Hi everybody and thank you for your answers

I have found the solution to my problem...
Actually there were no errors in my code neither in Tomcat 3.3.

The problem was that the Jsp file called in the left side of the frames, was in
the "Security" context ($TOMCAT_HOME/webapps/security) and the jsp file called
in the right side by the link was  in the "Other" context
($TOMCAT_HOME/webapps/other), so, the only one thing  I did is to place the
jsp's of the "Other" context  in the "Security" context, so It is working now!!!

I don't know why, but I had those contexts because I wanted to have all the
files organized by their own nature...... so now, I need to have only one
context... It will look awful when I add more files!!

Now, do you know why the session change only for calling another file placed in
other context?? I think it must have a solution.!

If you know how to fix it, please let me know, OK?

Thank you!
Regards,
Nancy


Huy K Dung wrote:

> Hi Nancy,
>
> I don't think it's Tomcat's problem. It's a problem with the browsers
> themselves.
>
> This problem happens to me even with Tomcat 3.2.3. At first I thought it's a
> problem with Tomcat 3.3.1 but I ran the same app with Tomcat 3.2.3 and the
> problem still persists.
>
> A workaround or some tricks will solve this problem I hope. For those who
> have come up with a fix for this problem, I appreciate very much if you read
> this message. Thanks.
>
> -----Original Message-----
> From: Nancy Crisostomo Martinez [mailto:nancycm@balam2.cuc.uqroo.mx]
> Sent: Saturday, March 02, 2002 02:56 PM
> To: Tomcat Users List
> Subject: Re: session object [urgent!]
>
> I have found a kind of bug or I don't know what....
> I tried to access to the session's attributes, with another servlet-engine
> and it works perferct!
> So... I think Tomcat 3.3 (I'm using) has a bug or maybe it is a cause of a
> bad configuration because the
> track is lost....
>
> What do you think about it?
> Does any of you have the same problem with sessions?
>
> Nancy Crisostomo Martinez wrote:
>
> > Hi everybody!
> >
> > I need your help..
> > I'm trying to track some attributes I added to the session object, but I
> > can't...
> >
> > I have an html file (main.htm) which opens a new window browser
> > (validate.jsp) when you press a button to access to one service...
> > Then when the user is validated in the validate.jsp file, I added two
> > attributes to the session object like this:
> >
> >      .......
> >      <%
> >      if (validUser(id_Usuario)){
> >         session.setAttribute("numero",id_Usuario);
> >         session.setAttribute("edad",num);
> >      .......
> >
> > and finally the window is closed and another new window is opened (
> > portal.jsp ).
> >
> >      %>
> >                  <script>
> >
> >
> window.open("portal.jsp","","top=0,left=0,width=791,height=520,scrollbars=ye
> s,resizable=yes,status=yes")
> >
> >                      return eval('close()')
> >                  </script>
> >      <%
> >      }
> >      %>
> >
> > The portal.jsp file is formed by frames:
> >
> >           <HTML>
> >           <FRAMESET rows="75,250*" frameborder="0" border="0"
> > framespacing="0">
> >                   <FRAME name="FrameArriba" scrolling="NO" noresize
> > marginwidth="0" marginheight="0" SRC="arriba.htm" frameborder="0">
> >
> >                  <FRAMESET cols="128,127*"  border="0" framespacing="0"
> > frameborder="0">
> >                          <FRAME name="FrameIzquierda" scrolling="NO"
> > marginwidth="0" marginheight="0" noresize SRC="izquierda.jsp"
> >           frameborder="NO">
> >                          <FRAME name="FrameServicio" marginwidth="0"
> > marginheight="0" noresize SRC="blanco.jsp" frameborder="NO" >
> >                  </FRAMESET>
> >
> >                  <NOFRAMES>
> >                        Su browser no acepta Frames.
> >                  </NOFRAMES>
> >           </FRAMESET>
> >           </HTML>
> >
> > In the left frame (FrameIzquierda) I have a jsp file (izquierda.jsp)
> > that reads the new session's attributes (numero,edad) and they are
> > displayed perfectly when the
> > portal.jsp file is opened. Moreover, in the right frame I put a jsp file
> > (blanco.jsp) that also reads the attributes 'id' and 'ag' and they are
> > perfectly displayed too.
> > But the problem becomes when I click a link placed in the izquierda.jsp
> > file :
> >
> >      .....
> >      <a href="top.jsp">test</a>
> >      or
> >      <a href="top.jsp" target="FrameServicio" >test</a>
> >      .....
> >
> > The top.jsp file also reads the attributes (numero, edad)...
> > In both cases the session's attributes are not displayed, they only
> > return a "null" value,  and the session id (session.getId()) is
> > differtent because when the link is
> > pressed, a new session object is created....so.. I don't know how to fix
> > this....
> > I really need to get the two attributes I stored previously in the
> > session object...
> >
> > Could you please help me???
> > I'm desperate!!
> >
> > Thank you in advance..
> > Nancy.
> >
> > --
> > To unsubscribe:   <ma...@jakarta.apache.org>
> > For additional commands: <ma...@jakarta.apache.org>
> > Troubles with the list: <ma...@jakarta.apache.org>
>
> --
> To unsubscribe:   <ma...@jakarta.apache.org>
> For additional commands: <ma...@jakarta.apache.org>
> Troubles with the list: <ma...@jakarta.apache.org>


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


RE: session object [urgent!]

Posted by Huy K Dung <hd...@lending4all.com>.
Hi Nancy,

I don't think it's Tomcat's problem. It's a problem with the browsers
themselves.

This problem happens to me even with Tomcat 3.2.3. At first I thought it's a
problem with Tomcat 3.3.1 but I ran the same app with Tomcat 3.2.3 and the
problem still persists.

A workaround or some tricks will solve this problem I hope. For those who
have come up with a fix for this problem, I appreciate very much if you read
this message. Thanks.

-----Original Message-----
From: Nancy Crisostomo Martinez [mailto:nancycm@balam2.cuc.uqroo.mx]
Sent: Saturday, March 02, 2002 02:56 PM
To: Tomcat Users List
Subject: Re: session object [urgent!]


I have found a kind of bug or I don't know what....
I tried to access to the session's attributes, with another servlet-engine
and it works perferct!
So... I think Tomcat 3.3 (I'm using) has a bug or maybe it is a cause of a
bad configuration because the
track is lost....

What do you think about it?
Does any of you have the same problem with sessions?



Nancy Crisostomo Martinez wrote:

> Hi everybody!
>
> I need your help..
> I'm trying to track some attributes I added to the session object, but I
> can't...
>
> I have an html file (main.htm) which opens a new window browser
> (validate.jsp) when you press a button to access to one service...
> Then when the user is validated in the validate.jsp file, I added two
> attributes to the session object like this:
>
>      .......
>      <%
>      if (validUser(id_Usuario)){
>         session.setAttribute("numero",id_Usuario);
>         session.setAttribute("edad",num);
>      .......
>
> and finally the window is closed and another new window is opened (
> portal.jsp ).
>
>      %>
>                  <script>
>
>
window.open("portal.jsp","","top=0,left=0,width=791,height=520,scrollbars=ye
s,resizable=yes,status=yes")
>
>                      return eval('close()')
>                  </script>
>      <%
>      }
>      %>
>
> The portal.jsp file is formed by frames:
>
>           <HTML>
>           <FRAMESET rows="75,250*" frameborder="0" border="0"
> framespacing="0">
>                   <FRAME name="FrameArriba" scrolling="NO" noresize
> marginwidth="0" marginheight="0" SRC="arriba.htm" frameborder="0">
>
>                  <FRAMESET cols="128,127*"  border="0" framespacing="0"
> frameborder="0">
>                          <FRAME name="FrameIzquierda" scrolling="NO"
> marginwidth="0" marginheight="0" noresize SRC="izquierda.jsp"
>           frameborder="NO">
>                          <FRAME name="FrameServicio" marginwidth="0"
> marginheight="0" noresize SRC="blanco.jsp" frameborder="NO" >
>                  </FRAMESET>
>
>                  <NOFRAMES>
>                        Su browser no acepta Frames.
>                  </NOFRAMES>
>           </FRAMESET>
>           </HTML>
>
> In the left frame (FrameIzquierda) I have a jsp file (izquierda.jsp)
> that reads the new session's attributes (numero,edad) and they are
> displayed perfectly when the
> portal.jsp file is opened. Moreover, in the right frame I put a jsp file
> (blanco.jsp) that also reads the attributes 'id' and 'ag' and they are
> perfectly displayed too.
> But the problem becomes when I click a link placed in the izquierda.jsp
> file :
>
>      .....
>      <a href="top.jsp">test</a>
>      or
>      <a href="top.jsp" target="FrameServicio" >test</a>
>      .....
>
> The top.jsp file also reads the attributes (numero, edad)...
> In both cases the session's attributes are not displayed, they only
> return a "null" value,  and the session id (session.getId()) is
> differtent because when the link is
> pressed, a new session object is created....so.. I don't know how to fix
> this....
> I really need to get the two attributes I stored previously in the
> session object...
>
> Could you please help me???
> I'm desperate!!
>
> Thank you in advance..
> Nancy.
>
> --
> To unsubscribe:   <ma...@jakarta.apache.org>
> For additional commands: <ma...@jakarta.apache.org>
> Troubles with the list: <ma...@jakarta.apache.org>


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>