jersey
  1. jersey
  2. JERSEY-683

samples/jersey-ejb - Add a resource class that produces a textual response to an HTTP GET

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Won't Fix
    • Affects Version/s: 1.6
    • Fix Version/s: 2.0-m09
    • Component/s: examples
    • Labels:
      None

      Description

      Need to add to jersey-ejb sample a resource class that produces a textual response to an HTTP GET and update jersey/samples/jersey-ejb/README.html appropriately to reference this newly added resource class.

      Change jersey-ejb/README.html to not display: "TODO A resource class that produces a textual response to an HTTP GET" (see http://java.net/jira/browse/JERSEY-665) Need to add this resource class

        Activity

        Hide
        jbenoit added a comment -

        We have helloworld, helloworld-webapp, and scala-helloworld-webapp - all fullfill this requirement via HelloworldResource defined similar to this:

        package com.sun.jersey.samples.helloworld.resources;

        import javax.ws.rs.GET;
        import javax.ws.rs.Produces;
        import javax.ws.rs.Path;

        // The Java class will be hosted at the URI path "/helloworld"
        @Path("/helloworld")
        public class HelloWorldResource {

        // The Java method will process HTTP GET requests
        @GET
        // The Java method will produce content identified by the MIME Media
        // type "text/plain"
        @Produces("text/plain")
        public String getClichedMessage()

        { // Return some cliched textual content return "Hello World"; }

        }

        Show
        jbenoit added a comment - We have helloworld, helloworld-webapp, and scala-helloworld-webapp - all fullfill this requirement via HelloworldResource defined similar to this: package com.sun.jersey.samples.helloworld.resources; import javax.ws.rs.GET; import javax.ws.rs.Produces; import javax.ws.rs.Path; // The Java class will be hosted at the URI path "/helloworld" @Path("/helloworld") public class HelloWorldResource { // The Java method will process HTTP GET requests @GET // The Java method will produce content identified by the MIME Media // type "text/plain" @Produces("text/plain") public String getClichedMessage() { // Return some cliched textual content return "Hello World"; } }
        Hide
        Marek Potociar added a comment -

        We're tracking TODOs in the code. Does not make sense to track them also in Jira.

        Show
        Marek Potociar added a comment - We're tracking TODOs in the code. Does not make sense to track them also in Jira.

          People

          • Assignee:
            Marek Potociar
            Reporter:
            jbenoit
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: