• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Glassfish 3, REST 1.0,

 
Ranch Hand
Posts: 89
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi to everyone,

Could someone please help with the issue. I would like to get acquainted with REST in different application servers. At the moment I'm deploying a simple REST application on Glassfish 3.1.2.

As per section 2.3.2 JSR 311, JAX-RS, Java API for RESTful Web Services 1.0: ""When using a JAX-RS aware servlet container, the 'servlet-class' element of the 'web.xml' descriptor SHOULD name the application supplied subclass of 'Application'. <...> When using a non-JAX-RS aware servlet container, the 'servlet-class' element of the 'web.xml' descriptor SHOULD name the JAX-RS implementation-supplied Servlet class. The application-supplied subclass of 'Application' is identified using an 'init-param' with a 'param-name' of 'javax.ws.rs.Application'."

I assume that Glassfish 3 is JAX-RS aware servlet container and try do the following.

My web.xml descriptor:



Class 'com.sze.EchoApplication':



The only 'com.sze.Echo' resource:



But when I send the request like 'http://127.0.0.1:8080/testprj/services/echo?input=some_input' II'm always receiving the error:



The code above does is executed successfuly on JBoss EAP 6/Wildfly.

 
Aaaaaand ... we're on the march. Stylin. Get with it tiny ad.
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
reply
    Bookmark Topic Watch Topic
  • New Topic