• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

URL rewriting & Http tunnelling question

 
Milind Mahajan
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic