I am using the forwarding capabilites of Java Servlets to forward a request from one servlet to another based on some input criteria.
The first servlet builds a cookie and normally sends it in the response back to the user. Then when the user sends a new request, the cookie gets sent along to servlet number 2.
Since I am forwarding the request (in one specific instance) from servlet 1 to servlet 2 without going back to the user, is there a way to build a cookie and place it in the request object so that the second servlet will see it?
Basically, I need the second servlet to think that the request came from the user as opposed to coming from servlet 1.
The first servlet builds a cookie and normally sends it in the response back to the user. Then when the user sends a new request, the cookie gets sent along to servlet number 2.
Since I am forwarding the request (in one specific instance) from servlet 1 to servlet 2 without going back to the user, is there a way to build a cookie and place it in the request object so that the second servlet will see it?
Basically, I need the second servlet to think that the request came from the user as opposed to coming from servlet 1.