diff --git a/JerseyTest/src/main/java/jerseyTest/resources/TigerRest.java b/JerseyTest/src/main/java/jerseyTest/resources/TigerRest.java new file mode 100644 index 0000000..2f7bd97 --- /dev/null +++ b/JerseyTest/src/main/java/jerseyTest/resources/TigerRest.java @@ -0,0 +1,22 @@ +package jerseyTest.resources; + +import javax.ws.rs.*; +import javax.ws.rs.core.MediaType; + +@Path("/tiger") +public class TigerRest { + private String name = null; + + @GET + @Produces(MediaType.TEXT_PLAIN) + public String getName() { + return name; + } + + @PUT + @Produces(MediaType.TEXT_PLAIN) + public String setName(@FormParam("name") String name) { + this.name = name; + return "success!"; + } +}