@@ -0,0 +1,1032 @@
+package de.asw.courses.web2016.demo.backend.http;%0A%0Aimport javax.ws.rs.GET;%0Aimport javax.ws.rs.Path;%0Aimport javax.ws.rs.Produces;%0A%0A/**%0A * %3Cpre%3E%7B@code curl default Accept: *%5C/*%7D%3C/pre%3E%0A * %3Cpre%3E%0A * %7B@code curl -v http://localhost:8080/asw2016-demo-webapp/resources/content-negotiation %7D%0A * %3C/pre%3E%0A *%0A * Browser?%0A * Try with chrome...%0A * @see http://localhost:8080/asw2016-demo-webapp/resources/content-negotiation%0A * %0A * @author tom%0A */%0A@Path(%22/content-negotiation%22)%0Apublic class ContentNegotiationExample %7B%0A%0A%09/**%0A%09 * %3Cpre%3E%0A%09 * %7B@code curl -v -H %22Accept: application/xml%22 http://localhost:8080/asw2016-demo-webapp/resources/content-negotiation %7D%0A%09 * %3C/pre%3E%0A%09 * %0A%09 * @return%0A%09 */%0A%09@GET%0A%09@Produces(%22application/xml%22)%0A%09public String getXml() %7B%0A%09%09return %22%3Cxml/%3E%22;%0A%09%7D%0A%0A%09/**%0A%09 * %3Cpre%3E%0A%09 * %7B@code curl -v -H %22Accept: application/json%22 http://localhost:8080/asw2016-demo-webapp/resources/content-negotiation %7D%0A%09 * %3C/pre%3E%0A%09 * %0A%09 * @return%0A%09 */%0A%09@GET%0A%09@Produces(%22application/json%22)%0A%09public String getJson() %7B%0A%09%09return %22%7B%5C%22json%5C%22:%5C%22true%5C%22%7D%22;%0A%09%7D%0A%7D%0A

Add content-negotiation example