I want to pass multiple values from one servlet to another one servlet. Please tell me how to pass that?
Depending if you use sessions:
However the variable will stay until the session dies, you overwrite it with something else, or you remove it.
If you forward one servlet to another servlet, you can store it in the request variable:
Which you can read after forwarding using request.getAttribute() after calling
RequestDispatcher.forward()
Note this does not work if you're doing a redirect instead of a servlet forward.