Web tier: servlets, JSP, Web frameworks: How do I pass parameters from one servlet to another?
Hello, my question is i'm trying to pass a parameter(ex. int value)from one servlet to another, then back to the initial servlet. to do a request and response if you will. Could someone help me out I would appreciate it..
- Posted by: jason w
- Posted on: June 26 2001 14:46 EDT
- How do I pass parameters from one servlet to another? by dasd gjhg on June 27 2001 04:08 EDT
- How do I pass parameters from one servlet to another? by VIJAY KHANNA on July 07 2001 13:24 EDT
Try putting the int value into the session object or set an attribute in the request object and then dispatch the request to the servlet that you want to call.Retrieve the int value from the session.
Use the RequestDispatcher object to forward values from current servlet to any servlet/jsp u want.
RequestDispatching is also used for servlet chaining