File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes URLs + Session Tracking Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "URLs + Session Tracking" Watch "URLs + Session Tracking" New topic

URLs + Session Tracking

Hussein Baghdadi
clojure forum advocate

Joined: Nov 08, 2003
Posts: 3479

Hola ranchers.
I have a few questions.
1. If my context was (mycontext) and I have a servlet which it's url-pattern is shopping/addToCart
how to point to this servlet from a JSP page?
should I write:
<a href="shopping/addToCart">Add To My Cart</a>
<a href="/mycontext/shopping/addToCart">Add To My Cart</a>
<a href="http://localhost:8080/shopping/addToCart">Add To My Cart</a>
I have tried the first one, but it is destroying my app.
what is the approach that used in the real sites?
2. I faced this problem:
In my app, the session tracking is ok, I have added some books to my cart, then I click show my cart.
it is fine with IE6, but when testing it with opera7, it don't work with a consistent way (I am enabling cookies with opera).
the first time a clicked show my cart it work, then I added some new books and when clicked show my cart again, it doesn't show the new added books.
If the application work with IE6 , why it don't with Opera7?
I agree. Here's the link:
subject: URLs + Session Tracking
It's not a secret anymore!