rest « Parameter « JSP-Servlet Q&A





1. Servlet parameters and doPut    stackoverflow.com

Trying to get parameters from a PUT request using HttpServlet#doPut:

public void doPut(HttpServletRequest request, HttpServletResponse response) {
    String name = request.getParameter("name");
    // name is null
}
Using curl ...

2. Returning data from rest web service with NO parameters in uri    stackoverflow.com

Having an issue returning a String from a rest web service:

[WebInvoke(Method = "PUT", UriTemplate = "/Filters", 
BodyStyle = WebMessageBodyStyle.Bare, ResponseFormat = WebMessageFormat.Json)]
[OperationContract]
string CreateFilter(Filter InputFilter);
As you can see the URL does not ...