diff --git a/JerseyTest/src/main/java/jerseyTest/resources/PochaRest.java b/JerseyTest/src/main/java/jerseyTest/resources/PochaRest.java new file mode 100644 index 0000000..5f0f394 --- /dev/null +++ b/JerseyTest/src/main/java/jerseyTest/resources/PochaRest.java @@ -0,0 +1,22 @@ +package jerseyTest.resources; + +import javax.ws.rs.*; +import javax.ws.rs.core.MediaType; + +@Path("/pocha") +public class PochaRest { + 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!"; + } +}