I've created a simple JAX-RS class on Glassfish 4.1 with the following method:
@GET
@Produces("application/json")
public ArrayList<VendorDTO> getVendorsJson()
{
VendorModel model = new VendorModel();
return model.getVendors(ds);
}
If dump the results of this method in the browser with http://localhost:8080/APPOCase1/webresources/vendor everything appears fine in json format:
results:
[{"vendorno":1,"name":"ABC Supply Co.","address1":"123 Maple St",".........
If I inspect the http headers in Chrome Tools I see I'm getting a status code of 1 instead of what I thought should be 200:
Request URL:http://localhost:8080/APPOCase1/webresources/vendor
Request Method:GET
**Status Code:1 OK**
Request Headersview source Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Encoding:gzip, deflate, sdch
Accept-Language:en-US,en;q=0.8,es;q=0.6
Cache-Control:max-age=0
Connection:keep-alive
Host:localhost:8080
User-Agent:Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.111 Safari/537.36
Is this normal, how can I force it to be 200?