• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

URL rewriting ?

 
Bharatesh H Kakamari
Ranch Hand
Posts: 198
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is URL rewriting ?
 
Suneel Setlur
Ranch Hand
Posts: 202
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
We track sessions 2 ways.
1. Cookies
2. URL Rewriting.
URL Rewriting is a method used to track sessions when the browser being used by the client does not support cookies.In this process, all links and redirections during the client session must be encoded to include session ID as part of the URL.
Hope this helps
Regards
Suneel
[This message has been edited by Suneel Setlur (edited January 27, 2001).]
 
Randall Twede
Ranch Hand
Posts: 4482
3
Java Python Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Suneel Setlur,
Could you give some sort of example of URL rewriting?
 
Bharatesh H Kakamari
Ranch Hand
Posts: 198
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please do provide examples. It will be more clear
Thanks
 
Hari Haran
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check out this site. http://www.jguru.com/jguru/faq/view.jsp?EID=1045
There is a clear explanation and a simple example.
Hope this helps!!
Happy Coding!!
 
Suneel Setlur
Ranch Hand
Posts: 202
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Randall,Bharatesh
Hari has given you an example which demostrates URL rewriting.
Note that you cannot use URL Rewriting with static HTML pages as the URL must be encoded for each user to include the session Id.
The way in which it is encoded is server specific, but will be like added information or parameters.

Regards
Suneel
 
vani
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sunnel
We track sessions in 4 ways.

1. Cookies
2. URL Rewriting.
3.Client Authentication.
4.Hidden form Fields.
Depending on the requirment,keeping in mind the security part the required one is selected.
e.g...
When u r working on a B2B portal u need to know the clients list and also vendor's list.Different screen's for different login.which can bo done by Client Authenticationi.e...by his ID & password.
Originally posted by Suneel Setlur:
Hi
We track sessions 2 ways.
1. Cookies
2. URL Rewriting.
URL Rewriting is a method used to track sessions when the browser being used by the client does not support cookies.In this process, all links and redirections during the client session must be encoded to include session ID as part of the URL.
Hope this helps
Regards
Suneel
[This message has been edited by Suneel Setlur (edited January 27, 2001).]

 
Hari Haran
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guys,
We have to code JSP pages which will work even if cookies is disabled.I am using EncodeUrl and it is working.

Eg:
===
String EncodeUrlModify = response.encodeUrl("modify.jsp?MenuOption=2&SubMenuOption=4");
document.frm.action="<%=EncodeUrlModify%>";
<a href="<%=EncodeUrlModify%>">

But,In the places where I use sendredirect, I used
response.encodeRedirectURL()
But it doesn't seem to work properly.
Please help me out.
Regards,
Hari
 
Suneel Setlur
Ranch Hand
Posts: 202
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Vani
Originally posted by vani:
Hi Sunnel
We track sessions in 4 ways.

1. Cookies
2. URL Rewriting.
3.Client Authentication.
4.Hidden form Fields.
Depending on the requirment,keeping in mind the security part the required one is selected.
e.g...
When u r working on a B2B portal u need to know the clients list and also vendor's list.Different screen's for different login.which can bo done by Client Authenticationi.e...by his ID & password.

Clients are identified using session Ids. To maintain(persist) unique identities we use cookies or URL rewriting.
Please elaborate on session tracking thru hidden fields.
-----------------------------------------------------------
Hari
Import java.net.* and try using URlEncoder.encode(String).
Please get back after trying.
Regards
Suneel

[This message has been edited by Suneel Setlur (edited January 29, 2001).]
 
Bharatesh H Kakamari
Ranch Hand
Posts: 198
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks all. Thanks also for a very good example urlsession.java for getting the basic understanding of url rewriting.
I have modified urlsession.java slightly for better understanding:

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic