Reputation: 141
How do I give data from one servlet to the next?
Upvotes: 0
Views: 49
Reputation: 279880
Anything after ?
is part of the query string. In a Servlet
, each key value pair in the query string becomes a request parameters.
If you have access to the HttpServletRequest
, you can access them with HttpServletRequest#getParameter(String)
. For example
request.getParameter("myId");
Upvotes: 1