Pourquoi est-ce Simple de JAX RS exemple ne fonctionne pas?

Je suis d'essayer de faire fonctionner un simple JAX RS exemple, mais je suis ne pas le faire.

web.xml

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:jsp="http://java.sun.com/xml/ns/javaee/jsp" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">
  <display-name>PLAYGROUND</display-name>
  <servlet-mapping>
    <servlet-name>playground.Rest</servlet-name>
    <url-pattern>/api/*</url-pattern>
  </servlet-mapping>
</web-app>

Rest.java

package playground;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.core.Application;

public class Rest extends Application {
    @GET
    @Path("hello")
    public String helloworld() {
        return "Hello World!";
    }
}

Accès http://localhost/{warcontext}/api/hello avec le navigateur (GET) me donne erreur 404 statut

C'est probablement quelque chose de très stupide, mais je ne peux pas comprendre.

À l'aide de:
JBoss EAP 6.1.0 (Java EE 6)

InformationsquelleAutor Fagner Brack | 2013-12-28