tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vikramjit Singh <vikramj...@gtllimited.com>
Subject RE: Réf. : Http Session
Date Fri, 13 Sep 2002 04:27:28 GMT
> -----Original Message-----
> From: Stephane.RAULT@r2isante.fr [mailto:Stephane.RAULT@r2isante.fr]
> Sent: Thursday, September 12, 2002 8:10 AM
> To: Tomcat Users List
> Subject: Réf. : Http Session
> 
> 
> 
> 
> --> Ok, not so much answer huh !! Is my question stupid ? By 
> the way, i'm
> adding one question to the rest. does Tomcat stores session 
> attributes on
> file system. If yes, is it possible to disable this function 
> or at least to
> prevent him to read them back after a reboot ?
An abstract from one of Craig's reply: 

They get serialized to a file called SESSIONS.ser in the work directory
for each webapp.  NOTE - only session attributes that are Serializable get
the benifit of this.

Yes, they survive a full restart as long as you don't delete the
SESSIONS.ser file.

To remove them:
cd $CATALINA_HOME/work/{servicename}/{hostname}/{context-path}
rm SESSIONS.ser

> 
> Thanks in advance for your help.
> 
> ------------------------------
> A++
> 
> Stéphane
> 
> ---------------------------------REPLY FOR
> ---------------------------------
> 
> Hi All !
> 
> I'm not sure I've understand everything about Session !!
> 
> I'm using Tomcat 4.0 and I use a Filter to check authentification.
> This filter filters everything except the connection page.
> 
> what I'm doing in doFilter :
> -----------------------CODE-----------------------------
>    HttpSession session = null;
>    if (request instanceof HttpServletRequest) {
>         session = ((HttpServletRequest) request).getSession();
>    }
>     MyObject connex = null;
>     if (session != null) {
>         connex = (MyObject) session.getAttribute(USER_PARAM);
>         if (connex != null) {
>             if (connex.getUser() != null) {
>                 // Continue !
>                 chain.doFilter(request, response);
>                 return;
>             }
>         }
>     }
>     connex = methodToCreateConnexIfFormFiledsArePresents(request);
>     if (connex != null) {
>         // Get in !
>         session = ((HttpServletRequest) request).getSession(true);
>         session.setAttribute(USER_PARAM, connex);
>         chain.doFilter(request, response);
>     } else {
> 
>         // Get out !
>         sendConnectionScreen(response);
>     }}
> 
> -----------------------END CODE-----------------------------
> My problem :
> 
> A client came into the site and connect. I goes inside and wait.
> I'm rebooting the server. (Tomcat should be reinitialise no ?? :-)
> Then the client make another request and the filter says ok, continue.
> I can even log the name of the user found in the MyObject connex. but
> myClient has never reconnect !
> 
> where am I wrong ?? where is the session attributes stored ??
> 
> Thanks in advance for your help.
> 
> ------------------------------
> A++
> 
> Stéphane
> 
> 
> --
> 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>
> 

--
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