Set the "crossContext" attribute of the Context tag to true. This way you
eliminate redundancy. And I think your session info will be preserved too.

RS




"Nancy Crisostomo Martinez" <[EMAIL PROTECTED]> on 04/03/2002
01:20:00 PM

Please respond to "Tomcat Users List" <[EMAIL PROTECTED]>

To:   Tomcat Users List <[EMAIL PROTECTED]>
cc:

Subject:  Re: session object [urgent!] [solution]

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:[EMAIL PROTECTED]]
> 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:   <mailto:[EMAIL PROTECTED]>
> > For additional commands: <mailto:[EMAIL PROTECTED]>
> > Troubles with the list: <mailto:[EMAIL PROTECTED]>
>
> --
> To unsubscribe:   <mailto:[EMAIL PROTECTED]>
> For additional commands: <mailto:[EMAIL PROTECTED]>
> Troubles with the list: <mailto:[EMAIL PROTECTED]>


--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>









--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

Reply via email to