aspose file tools*
The moose likes Servlets and the fly likes URL rewriting & Http tunnelling question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "URL rewriting & Http tunnelling question" Watch "URL rewriting & Http tunnelling question" New topic
Author

URL rewriting & Http tunnelling question

Milind Mahajan
Ranch Hand

Joined: Oct 23, 2000
Posts: 77
Hi,
Can somebody expailn me how URL rewriting works ? I know little about the concept but unable understand it completely. I also wish to know something about Http Tunnellig.
Thanks in advance,
Milind
scott laplante
Greenhorn

Joined: Dec 20, 2000
Posts: 2
I believe URLRewriting is used when the app server can't use cookies to store session data. The URL is rewritten to include a hash, which when read from the server at the time of the next request, will alert the server to find the correct session on the server.
http:\\www.myCompany.com/servlet/AServlet
would be rewritten as something like:
http:\\www.myCompany.com/servlet/AServlet?Session=4JwI34QW83f6R
(backslashes used to hopefully step away from any display issues...)
is this right?
Milind Mahajan
Ranch Hand

Joined: Oct 23, 2000
Posts: 77
Hi,
Thanks for the reply Scott. Yes, what you say is right.
I wish to know how it is done programmatically ( in servlets ) using some methods like encodeRedirectUrl() etc.,
I hope somebody helps me.
Thanks,
Milind
manav kher
Ranch Hand

Joined: Nov 21, 2000
Posts: 98
i think if you simply use a redirect method like response.sendRedirect("currentURL?variable=somevalue") this will call the current document and the variable can also be read by jsp/javascript/servlet etc
manav
nirmal baba
Greenhorn

Joined: Apr 06, 2001
Posts: 10
Hi
One important thing to keep in mind is that the jsessionid generated for keeping track of the session when u are using HttpSession object is server-specific..Different servers have diff ways of generating these jsessionids. While using the HttpSession API for session tracking u need not bother abt these ids.These r automatically generated for u.
Nirmal
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: URL rewriting & Http tunnelling question