This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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 Android Security Essentials Live Lessons this week in the Android 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: 3476

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?
It is sorta covered in the JavaRanch Style Guide.
subject: URLs + Session Tracking
Similar Threads
How To Convert a Servlet File to a JSP File
show cart in shopping cart
switching between cookies and url rewritten, HELP
Need configuration