Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

We should encode each link in our application

 
Abhishek KumarSoni
Ranch Hand
Posts: 61
Chrome Firefox Browser
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
During my reading of session management from Head First JSP & Servlet I found that there are two ways of session management.One is By help of cookies In case If client has not enabled it then URL rewriting is substitute.It means that while developing a web app we should encode each and every link.Because we at time of development even after development we are not aware of fact that whether our client will enable cookie or not So as alternate we should encode each link by
using <code>response.encodeURL()</code>
method .Is this true?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64631
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you care about working in environments where people disable cookies, then yes. Personally, I choose not to: anyone who disables cookies or JavaScript does not use my web applications.

So as with most things, the answer is: it depends.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64631
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
P.S. In a JSP you would use <c:url>, not Java code,
 
Abhishek KumarSoni
Ranch Hand
Posts: 61
Chrome Firefox Browser
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:P.S. In a JSP you would use <c:url>, not Java code,

Its mean most of the website like google or microsoft encodes their URL because they work on global level where people may have disable their cookies
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic