tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexandros Kotsiras <alexandro...@prodigy.net>
Subject Re: URL rewriting
Date Fri, 19 Apr 2002 17:44:36 GMT
This is the main reason that doesnt let me migratre from JServ to Tomcat.
I don't know why URLRewriting is not working with cookies disabled.
In other words with cookies disabled forget session tracking....

"Alexey V. Meledin" wrote:

> Hi
>  tomcat-users!
>
> I need somebody's consultation about "session tracking" theme.
>
> I use TomCat 3.1beta through Apache 1.3.12 and want to organize
> session tracking in my servlets.
> In case with enabled cookies there's no problems, all is working.
> But when I prohibit cookies, my servlets lose early created session
> and create new session ID by each request.
> Where is my mistake?
> Or my TomCat doesn't support URL-rewriting?
>
> Here is my code:
> =======================================================
> //sessionID test
> import java.io.*;
> import javax.servlet.*;
> import javax.servlet.http.*;
>
> public class session extends HttpServlet
> {
>   public void doGet(HttpServletRequest request, HttpServletResponse response)
>     throws IOException, ServletException
>   {
>     HttpSession sess = request.getSession(true);
>     response.setContentType("text/html; charset=windows-1251");
>     PrintWriter out = response.getWriter();
>
>     out.println("<h2>Servlet</h2>");
>
>     out.println("sessionID = " + sess.getId() + "<br>");
>
>     out.println("<a href=\"" +
>                 response.encodeURL("session") +
>                 "\">self link</a>");
>     //self-pointing link. I was testing session tracking with it.
>
>   }//doGet
> }
> =======================================================
>
> Thanks.
>
> Alexey V. Meledin <avm@webclub.ru>
> > InterForge Developers Group,  St-Petersburg, Russia
> New: http://www.crossroad.ru; http://www.garoway.com
> > > > > > > "InterForge to Forge Ahead" > > > > > >
>
>
> Alexey V. Meledin <avm@webclub.ru>
> > InterForge Developers Group,  St-Petersburg, Russia
> New: http://www.crossroad.ru; http://www.garoway.com
> > > > > > > "InterForge to Forge Ahead" > > > > > >
>
>
> --------------------------------------------------------------------------
> To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commmands, email: tomcat-user-help@jakarta.apache.org


Mime
View raw message