users@jersey.java.net

[Jersey] Testing GET resources in a browser

From: richmondJava <jerryhill_at_yahoo.com>
Date: Tue, 26 Aug 2008 13:30:53 -0700 (PDT)

I am trying to stand up Jersey in a Weblogic Portal project and have deployed
a simple service with a GET method:

<servlet>
                <servlet-name>Jersey REST Servlet</servlet-name>
                <servlet-class>
com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class>
                <init-param>
              
<param-name>com.sun.jersey.config.property.resourceConfigClass</param-name>
              
<param-value>com.sun.jersey.api.core.PackagesResourceConfig</param-value>
                  </init-param>
                  <init-param>
                      <param-name>com.sun.jersey.config.property.packages</param-name>
                      <param-value>com.capitalone.ccl.service.rest.impl</param-value>
                  </init-param>
                <load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
                <servlet-name> Jersey REST Servlet </servlet-name>
                <url-pattern>/rest/*</url-pattern>
</servlet-mapping>

The service:

@Path("/helloworld")
public class ConfirmOffersRestService extends AbstractRestService
                implements Service<ConfirmOffersRestRequest, ConfirmOffersRestResponse>{

        @GET
        @Produces("text/html")
        public String hello(){
                return "Hello world";
        }




All I am trying to do is hit the service from a browser to see the response.
I want to test it before writing a bunch of client code. I go into the
browser and use the ".../rest/helloworld" address.

All I get is "Invalid command: [/helloworld] -- Check syntax"


What am I missing? Is the browser not generating a GET request to the
resource?

Thanks for any help...
jerry..
-- 
View this message in context: http://n2.nabble.com/Testing-GET-resources-in-a-browser-tp785201p785201.html
Sent from the Jersey mailing list archive at Nabble.com.