• Post Reply Bookmark Topic Watch Topic
  • New Topic

Session with localhost  RSS feed

 
hari saphre
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am working with Sessions for a standard shopping cart example.
If a session exists across pages of different items, then a bill is generated in the final page else it goes to the login page.

I disable cookies and test if it goes to the login page.

This works in 2 scenarios
1) When i access my application using http://127.0.0.1 ort/proj/servletname
2) When my server is accessed using my ip from a client
http://myip ort/proj/servletname

It does not work correctly when localhost is used.
http://localhost ort/proj/servletname
Even when cookies is disabled it maintains the session and generates the bill.

Please let me know if I am missing something here.

Thanks in advance.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"haritha ph", please check your private messages for an important note from me.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!