You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Guenther Wieser <wi...@creative-it.com> on 2000/04/12 17:07:00 UTC

URL-rewriting

Hi!

I'm new to the list, so please don't hurt me if this is a question
everyone asks and was answered several times before.

I'm using the following code to create a session (in a servlet called
"Test"):

      HttpSession session = req.getSession(true);
      res.setContentType("text/html");
      PrintWriter out = res.getWriter();
	.......
      out.println("\<a href=\"" + res.encodeURL("./Test") +
"\">Reload</a>");

I want to use URL-Rewriting if cookies are not supported, so I pass the
url through encodeURL(String) to get it encoded.
But the URL comes back unchanged, and therefore I can not keep track of
the session.
Of course, with "cookies enabled", it works.
Am I doing something really wrong?

Thanks,
-- 
Guenther Wieser      
creative-it/Guenther Wieser Software KEG
Student of Telematik at Graz University of Technology / Austria
http://www.creative-it.com        mailto:wieserg@creative-it.com
-> In A World Without Walls And Fences, Who Needs Windows And Gates? <-

Re: URL-rewriting

Posted by Guenther Wieser <wi...@creative-it.com>.
"Craig R. McClanahan" wrote:
> 
> What version of Tomcat are you using?  URL rewriting support was added very
> recently -- try the 3.1 release candidate 1 build.

Sorry to ask that, but do you mean 3.1 beta or a nightly snapshot?
Couldn't find anything like a "RC1" on the jakarta homepage.

Thanks,

> Craig McClanahan
> 
> --------------------------------------------------------------------------
> To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commmands, email: tomcat-user-help@jakarta.apache.org

-- 
Guenther Wieser      
creative-it/Guenther Wieser Software KEG
Student of Telematik at Graz University of Technology / Austria
http://www.creative-it.com        mailto:wieserg@creative-it.com
-> In A World Without Walls And Fences, Who Needs Windows And Gates? <-

Re: URL-rewriting

Posted by "Craig R. McClanahan" <Cr...@eng.sun.com>.
Guenther Wieser wrote:

>
> I want to use URL-Rewriting if cookies are not supported, so I pass the
> url through encodeURL(String) to get it encoded.
> But the URL comes back unchanged, and therefore I can not keep track of
> the session.
> Of course, with "cookies enabled", it works.
> Am I doing something really wrong?

What version of Tomcat are you using?  URL rewriting support was added very
recently -- try the 3.1 release candidate 1 build.

>
> Thanks,
> --
> Guenther Wieser

Craig McClanahan