Reputation: 7998
This must be awfully simple, but I didn't find an answer.
Here is an easy example on how to listen to a get request with a jetty server.
However, it doesn't cover the case that it's not just a "http://www.foo.com/bar" request, but something like "http://www.foo.com/bar?name=guy&value=1".
So how do I get the parameters in jetty?
Upvotes: 7
Views: 14239
Reputation: 7335
You can use request.getParameter("name") and request.getParameter("value") in the doGet method of your servlet.
Upvotes: 3
Reputation: 92210
This is the API for ServletRequest. You should use:
request.getParameter("name");
request.getParameter("value");
Upvotes: 14