Not Found JAX-RS












1















i'm writing simple jax-rs app with wildfly.
And i get a 404 Not Found
error:



There is the class:



package com.trofimovep;

import javax.enterprise.context.ApplicationScoped;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.core.Application;
import javax.ws.rs.core.Response;

@ApplicationScoped
@Path("/he")
public class Start extends Application {
@GET
@Path("/books")
public Response showBooks() {
String output = "This is a BookShop !";
return Response.status(200).entity(output).build();
}
}


jboss-web.xml:



<?xml version="1.0" encoding="UTF-8"?>
<jboss-web version="10.0"
xmlns="http://www.jboss.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee http://www.jboss.org/j2ee/schema/jboss-web_10_0.xsd">

<context-root>/Bookapp</context-root>
</jboss-web>


pom.xml



<?xml version="1.0" encoding="UTF-8"?>

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>0</groupId>
<artifactId>Bookapp</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>war</packaging>

<name>Book JAX_RS Maven Webapp</name>
<!-- FIXME change it to the project's website -->
<url>http://www.example.com</url>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
</properties>

<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>

<!-- https://mvnrepository.com/artifact/com.sun.jersey/jersey-server -->
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-server</artifactId>
<version>1.19.4</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.sun.jersey/jersey-servlet -->
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-servlet</artifactId>
<version>1.19.4</version>
</dependency>

<!--&lt;!&ndash; https://mvnrepository.com/artifact/org.glassfish.jersey.containers/jersey-container-servlet-core &ndash;&gt;-->
<!--<dependency>-->
<!--<groupId>org.glassfish.jersey.containers</groupId>-->
<!--<artifactId>jersey-container-servlet-core</artifactId>-->
<!--<version>2.27</version>-->
<!--</dependency>-->


<!-- https://mvnrepository.com/artifact/com.sun.jersey/jersey-client -->
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-client</artifactId>
<version>1.19.4</version>
</dependency>

<!-- https://mvnrepository.com/artifact/javax/javaee-api -->
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>7.0</version>
<scope>provided</scope>
</dependency>

<!-- https://mvnrepository.com/artifact/org.wildfly.swarm/wildfly-swarm-plugin -->
<dependency>
<groupId>org.wildfly.swarm</groupId>
<artifactId>wildfly-swarm-plugin</artifactId>
<version>2018.5.0</version>
</dependency>

</dependencies>

<build>
<finalName>Book JAX_RS</finalName>
<pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
<plugins>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>3.0.0</version>
</plugin>
<!-- see http://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_war_packaging -->
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.0.2</version>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.20.1</version>
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>3.2.0</version>
</plugin>
<plugin>
<artifactId>maven-install-plugin</artifactId>
<version>2.5.2</version>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>


I try almost variants: created another class which extends from Application, remove the @ApplicationScoped,
and all my actions don't give the result, it is 404 NOT FOUND on http://localhost:8080/he/books.
What i do wrong? Why it can not see the message by path?










share|improve this question





























    1















    i'm writing simple jax-rs app with wildfly.
    And i get a 404 Not Found
    error:



    There is the class:



    package com.trofimovep;

    import javax.enterprise.context.ApplicationScoped;
    import javax.ws.rs.GET;
    import javax.ws.rs.Path;
    import javax.ws.rs.core.Application;
    import javax.ws.rs.core.Response;

    @ApplicationScoped
    @Path("/he")
    public class Start extends Application {
    @GET
    @Path("/books")
    public Response showBooks() {
    String output = "This is a BookShop !";
    return Response.status(200).entity(output).build();
    }
    }


    jboss-web.xml:



    <?xml version="1.0" encoding="UTF-8"?>
    <jboss-web version="10.0"
    xmlns="http://www.jboss.com/xml/ns/javaee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee http://www.jboss.org/j2ee/schema/jboss-web_10_0.xsd">

    <context-root>/Bookapp</context-root>
    </jboss-web>


    pom.xml



    <?xml version="1.0" encoding="UTF-8"?>

    <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>0</groupId>
    <artifactId>Bookapp</artifactId>
    <version>1.0-SNAPSHOT</version>
    <packaging>war</packaging>

    <name>Book JAX_RS Maven Webapp</name>
    <!-- FIXME change it to the project's website -->
    <url>http://www.example.com</url>

    <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.compiler.source>1.7</maven.compiler.source>
    <maven.compiler.target>1.7</maven.compiler.target>
    </properties>

    <dependencies>
    <dependency>
    <groupId>junit</groupId>
    <artifactId>junit</artifactId>
    <version>4.11</version>
    <scope>test</scope>
    </dependency>

    <!-- https://mvnrepository.com/artifact/com.sun.jersey/jersey-server -->
    <dependency>
    <groupId>com.sun.jersey</groupId>
    <artifactId>jersey-server</artifactId>
    <version>1.19.4</version>
    </dependency>
    <!-- https://mvnrepository.com/artifact/com.sun.jersey/jersey-servlet -->
    <dependency>
    <groupId>com.sun.jersey</groupId>
    <artifactId>jersey-servlet</artifactId>
    <version>1.19.4</version>
    </dependency>

    <!--&lt;!&ndash; https://mvnrepository.com/artifact/org.glassfish.jersey.containers/jersey-container-servlet-core &ndash;&gt;-->
    <!--<dependency>-->
    <!--<groupId>org.glassfish.jersey.containers</groupId>-->
    <!--<artifactId>jersey-container-servlet-core</artifactId>-->
    <!--<version>2.27</version>-->
    <!--</dependency>-->


    <!-- https://mvnrepository.com/artifact/com.sun.jersey/jersey-client -->
    <dependency>
    <groupId>com.sun.jersey</groupId>
    <artifactId>jersey-client</artifactId>
    <version>1.19.4</version>
    </dependency>

    <!-- https://mvnrepository.com/artifact/javax/javaee-api -->
    <dependency>
    <groupId>javax</groupId>
    <artifactId>javaee-api</artifactId>
    <version>7.0</version>
    <scope>provided</scope>
    </dependency>

    <!-- https://mvnrepository.com/artifact/org.wildfly.swarm/wildfly-swarm-plugin -->
    <dependency>
    <groupId>org.wildfly.swarm</groupId>
    <artifactId>wildfly-swarm-plugin</artifactId>
    <version>2018.5.0</version>
    </dependency>

    </dependencies>

    <build>
    <finalName>Book JAX_RS</finalName>
    <pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
    <plugins>
    <plugin>
    <artifactId>maven-clean-plugin</artifactId>
    <version>3.0.0</version>
    </plugin>
    <!-- see http://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_war_packaging -->
    <plugin>
    <artifactId>maven-resources-plugin</artifactId>
    <version>3.0.2</version>
    </plugin>
    <plugin>
    <artifactId>maven-compiler-plugin</artifactId>
    <version>3.7.0</version>
    </plugin>
    <plugin>
    <artifactId>maven-surefire-plugin</artifactId>
    <version>2.20.1</version>
    </plugin>
    <plugin>
    <artifactId>maven-war-plugin</artifactId>
    <version>3.2.0</version>
    </plugin>
    <plugin>
    <artifactId>maven-install-plugin</artifactId>
    <version>2.5.2</version>
    </plugin>
    <plugin>
    <artifactId>maven-deploy-plugin</artifactId>
    <version>2.8.2</version>
    </plugin>
    </plugins>
    </pluginManagement>
    </build>
    </project>


    I try almost variants: created another class which extends from Application, remove the @ApplicationScoped,
    and all my actions don't give the result, it is 404 NOT FOUND on http://localhost:8080/he/books.
    What i do wrong? Why it can not see the message by path?










    share|improve this question



























      1












      1








      1








      i'm writing simple jax-rs app with wildfly.
      And i get a 404 Not Found
      error:



      There is the class:



      package com.trofimovep;

      import javax.enterprise.context.ApplicationScoped;
      import javax.ws.rs.GET;
      import javax.ws.rs.Path;
      import javax.ws.rs.core.Application;
      import javax.ws.rs.core.Response;

      @ApplicationScoped
      @Path("/he")
      public class Start extends Application {
      @GET
      @Path("/books")
      public Response showBooks() {
      String output = "This is a BookShop !";
      return Response.status(200).entity(output).build();
      }
      }


      jboss-web.xml:



      <?xml version="1.0" encoding="UTF-8"?>
      <jboss-web version="10.0"
      xmlns="http://www.jboss.com/xml/ns/javaee"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee http://www.jboss.org/j2ee/schema/jboss-web_10_0.xsd">

      <context-root>/Bookapp</context-root>
      </jboss-web>


      pom.xml



      <?xml version="1.0" encoding="UTF-8"?>

      <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
      <modelVersion>4.0.0</modelVersion>

      <groupId>0</groupId>
      <artifactId>Bookapp</artifactId>
      <version>1.0-SNAPSHOT</version>
      <packaging>war</packaging>

      <name>Book JAX_RS Maven Webapp</name>
      <!-- FIXME change it to the project's website -->
      <url>http://www.example.com</url>

      <properties>
      <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
      <maven.compiler.source>1.7</maven.compiler.source>
      <maven.compiler.target>1.7</maven.compiler.target>
      </properties>

      <dependencies>
      <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.11</version>
      <scope>test</scope>
      </dependency>

      <!-- https://mvnrepository.com/artifact/com.sun.jersey/jersey-server -->
      <dependency>
      <groupId>com.sun.jersey</groupId>
      <artifactId>jersey-server</artifactId>
      <version>1.19.4</version>
      </dependency>
      <!-- https://mvnrepository.com/artifact/com.sun.jersey/jersey-servlet -->
      <dependency>
      <groupId>com.sun.jersey</groupId>
      <artifactId>jersey-servlet</artifactId>
      <version>1.19.4</version>
      </dependency>

      <!--&lt;!&ndash; https://mvnrepository.com/artifact/org.glassfish.jersey.containers/jersey-container-servlet-core &ndash;&gt;-->
      <!--<dependency>-->
      <!--<groupId>org.glassfish.jersey.containers</groupId>-->
      <!--<artifactId>jersey-container-servlet-core</artifactId>-->
      <!--<version>2.27</version>-->
      <!--</dependency>-->


      <!-- https://mvnrepository.com/artifact/com.sun.jersey/jersey-client -->
      <dependency>
      <groupId>com.sun.jersey</groupId>
      <artifactId>jersey-client</artifactId>
      <version>1.19.4</version>
      </dependency>

      <!-- https://mvnrepository.com/artifact/javax/javaee-api -->
      <dependency>
      <groupId>javax</groupId>
      <artifactId>javaee-api</artifactId>
      <version>7.0</version>
      <scope>provided</scope>
      </dependency>

      <!-- https://mvnrepository.com/artifact/org.wildfly.swarm/wildfly-swarm-plugin -->
      <dependency>
      <groupId>org.wildfly.swarm</groupId>
      <artifactId>wildfly-swarm-plugin</artifactId>
      <version>2018.5.0</version>
      </dependency>

      </dependencies>

      <build>
      <finalName>Book JAX_RS</finalName>
      <pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
      <plugins>
      <plugin>
      <artifactId>maven-clean-plugin</artifactId>
      <version>3.0.0</version>
      </plugin>
      <!-- see http://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_war_packaging -->
      <plugin>
      <artifactId>maven-resources-plugin</artifactId>
      <version>3.0.2</version>
      </plugin>
      <plugin>
      <artifactId>maven-compiler-plugin</artifactId>
      <version>3.7.0</version>
      </plugin>
      <plugin>
      <artifactId>maven-surefire-plugin</artifactId>
      <version>2.20.1</version>
      </plugin>
      <plugin>
      <artifactId>maven-war-plugin</artifactId>
      <version>3.2.0</version>
      </plugin>
      <plugin>
      <artifactId>maven-install-plugin</artifactId>
      <version>2.5.2</version>
      </plugin>
      <plugin>
      <artifactId>maven-deploy-plugin</artifactId>
      <version>2.8.2</version>
      </plugin>
      </plugins>
      </pluginManagement>
      </build>
      </project>


      I try almost variants: created another class which extends from Application, remove the @ApplicationScoped,
      and all my actions don't give the result, it is 404 NOT FOUND on http://localhost:8080/he/books.
      What i do wrong? Why it can not see the message by path?










      share|improve this question
















      i'm writing simple jax-rs app with wildfly.
      And i get a 404 Not Found
      error:



      There is the class:



      package com.trofimovep;

      import javax.enterprise.context.ApplicationScoped;
      import javax.ws.rs.GET;
      import javax.ws.rs.Path;
      import javax.ws.rs.core.Application;
      import javax.ws.rs.core.Response;

      @ApplicationScoped
      @Path("/he")
      public class Start extends Application {
      @GET
      @Path("/books")
      public Response showBooks() {
      String output = "This is a BookShop !";
      return Response.status(200).entity(output).build();
      }
      }


      jboss-web.xml:



      <?xml version="1.0" encoding="UTF-8"?>
      <jboss-web version="10.0"
      xmlns="http://www.jboss.com/xml/ns/javaee"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee http://www.jboss.org/j2ee/schema/jboss-web_10_0.xsd">

      <context-root>/Bookapp</context-root>
      </jboss-web>


      pom.xml



      <?xml version="1.0" encoding="UTF-8"?>

      <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
      <modelVersion>4.0.0</modelVersion>

      <groupId>0</groupId>
      <artifactId>Bookapp</artifactId>
      <version>1.0-SNAPSHOT</version>
      <packaging>war</packaging>

      <name>Book JAX_RS Maven Webapp</name>
      <!-- FIXME change it to the project's website -->
      <url>http://www.example.com</url>

      <properties>
      <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
      <maven.compiler.source>1.7</maven.compiler.source>
      <maven.compiler.target>1.7</maven.compiler.target>
      </properties>

      <dependencies>
      <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.11</version>
      <scope>test</scope>
      </dependency>

      <!-- https://mvnrepository.com/artifact/com.sun.jersey/jersey-server -->
      <dependency>
      <groupId>com.sun.jersey</groupId>
      <artifactId>jersey-server</artifactId>
      <version>1.19.4</version>
      </dependency>
      <!-- https://mvnrepository.com/artifact/com.sun.jersey/jersey-servlet -->
      <dependency>
      <groupId>com.sun.jersey</groupId>
      <artifactId>jersey-servlet</artifactId>
      <version>1.19.4</version>
      </dependency>

      <!--&lt;!&ndash; https://mvnrepository.com/artifact/org.glassfish.jersey.containers/jersey-container-servlet-core &ndash;&gt;-->
      <!--<dependency>-->
      <!--<groupId>org.glassfish.jersey.containers</groupId>-->
      <!--<artifactId>jersey-container-servlet-core</artifactId>-->
      <!--<version>2.27</version>-->
      <!--</dependency>-->


      <!-- https://mvnrepository.com/artifact/com.sun.jersey/jersey-client -->
      <dependency>
      <groupId>com.sun.jersey</groupId>
      <artifactId>jersey-client</artifactId>
      <version>1.19.4</version>
      </dependency>

      <!-- https://mvnrepository.com/artifact/javax/javaee-api -->
      <dependency>
      <groupId>javax</groupId>
      <artifactId>javaee-api</artifactId>
      <version>7.0</version>
      <scope>provided</scope>
      </dependency>

      <!-- https://mvnrepository.com/artifact/org.wildfly.swarm/wildfly-swarm-plugin -->
      <dependency>
      <groupId>org.wildfly.swarm</groupId>
      <artifactId>wildfly-swarm-plugin</artifactId>
      <version>2018.5.0</version>
      </dependency>

      </dependencies>

      <build>
      <finalName>Book JAX_RS</finalName>
      <pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
      <plugins>
      <plugin>
      <artifactId>maven-clean-plugin</artifactId>
      <version>3.0.0</version>
      </plugin>
      <!-- see http://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_war_packaging -->
      <plugin>
      <artifactId>maven-resources-plugin</artifactId>
      <version>3.0.2</version>
      </plugin>
      <plugin>
      <artifactId>maven-compiler-plugin</artifactId>
      <version>3.7.0</version>
      </plugin>
      <plugin>
      <artifactId>maven-surefire-plugin</artifactId>
      <version>2.20.1</version>
      </plugin>
      <plugin>
      <artifactId>maven-war-plugin</artifactId>
      <version>3.2.0</version>
      </plugin>
      <plugin>
      <artifactId>maven-install-plugin</artifactId>
      <version>2.5.2</version>
      </plugin>
      <plugin>
      <artifactId>maven-deploy-plugin</artifactId>
      <version>2.8.2</version>
      </plugin>
      </plugins>
      </pluginManagement>
      </build>
      </project>


      I try almost variants: created another class which extends from Application, remove the @ApplicationScoped,
      and all my actions don't give the result, it is 404 NOT FOUND on http://localhost:8080/he/books.
      What i do wrong? Why it can not see the message by path?







      java jax-rs wildfly






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 25 '18 at 21:50







      Eugene Trofimov

















      asked Nov 20 '18 at 18:51









      Eugene TrofimovEugene Trofimov

      538




      538
























          2 Answers
          2






          active

          oldest

          votes


















          1














          I dont see you using this in your URL



          <context-root>/Bookapp</context-root>


          so maybe bookapp/he/books would work






          share|improve this answer































            0














            It should to create empty class extends Application for saying that it's JAX-RS application



            import javax.enterprise.context.ApplicationScoped;
            import javax.ws.rs.ApplicationPath;
            import javax.ws.rs.core.Application;

            @ApplicationScoped
            @ApplicationPath("")
            class Rest extends Application {
            public Rest() {
            }
            }





            share|improve this answer























              Your Answer






              StackExchange.ifUsing("editor", function () {
              StackExchange.using("externalEditor", function () {
              StackExchange.using("snippets", function () {
              StackExchange.snippets.init();
              });
              });
              }, "code-snippets");

              StackExchange.ready(function() {
              var channelOptions = {
              tags: "".split(" "),
              id: "1"
              };
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function() {
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled) {
              StackExchange.using("snippets", function() {
              createEditor();
              });
              }
              else {
              createEditor();
              }
              });

              function createEditor() {
              StackExchange.prepareEditor({
              heartbeatType: 'answer',
              autoActivateHeartbeat: false,
              convertImagesToLinks: true,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: 10,
              bindNavPrevention: true,
              postfix: "",
              imageUploader: {
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              },
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              });


              }
              });














              draft saved

              draft discarded


















              StackExchange.ready(
              function () {
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53399650%2fnot-found-jax-rs%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              2 Answers
              2






              active

              oldest

              votes








              2 Answers
              2






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              1














              I dont see you using this in your URL



              <context-root>/Bookapp</context-root>


              so maybe bookapp/he/books would work






              share|improve this answer




























                1














                I dont see you using this in your URL



                <context-root>/Bookapp</context-root>


                so maybe bookapp/he/books would work






                share|improve this answer


























                  1












                  1








                  1







                  I dont see you using this in your URL



                  <context-root>/Bookapp</context-root>


                  so maybe bookapp/he/books would work






                  share|improve this answer













                  I dont see you using this in your URL



                  <context-root>/Bookapp</context-root>


                  so maybe bookapp/he/books would work







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Nov 20 '18 at 18:59









                  AntoniossssAntoniossss

                  15.4k12253




                  15.4k12253

























                      0














                      It should to create empty class extends Application for saying that it's JAX-RS application



                      import javax.enterprise.context.ApplicationScoped;
                      import javax.ws.rs.ApplicationPath;
                      import javax.ws.rs.core.Application;

                      @ApplicationScoped
                      @ApplicationPath("")
                      class Rest extends Application {
                      public Rest() {
                      }
                      }





                      share|improve this answer




























                        0














                        It should to create empty class extends Application for saying that it's JAX-RS application



                        import javax.enterprise.context.ApplicationScoped;
                        import javax.ws.rs.ApplicationPath;
                        import javax.ws.rs.core.Application;

                        @ApplicationScoped
                        @ApplicationPath("")
                        class Rest extends Application {
                        public Rest() {
                        }
                        }





                        share|improve this answer


























                          0












                          0








                          0







                          It should to create empty class extends Application for saying that it's JAX-RS application



                          import javax.enterprise.context.ApplicationScoped;
                          import javax.ws.rs.ApplicationPath;
                          import javax.ws.rs.core.Application;

                          @ApplicationScoped
                          @ApplicationPath("")
                          class Rest extends Application {
                          public Rest() {
                          }
                          }





                          share|improve this answer













                          It should to create empty class extends Application for saying that it's JAX-RS application



                          import javax.enterprise.context.ApplicationScoped;
                          import javax.ws.rs.ApplicationPath;
                          import javax.ws.rs.core.Application;

                          @ApplicationScoped
                          @ApplicationPath("")
                          class Rest extends Application {
                          public Rest() {
                          }
                          }






                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Nov 24 '18 at 19:21









                          Eugene TrofimovEugene Trofimov

                          538




                          538






























                              draft saved

                              draft discarded




















































                              Thanks for contributing an answer to Stack Overflow!


                              • Please be sure to answer the question. Provide details and share your research!

                              But avoid



                              • Asking for help, clarification, or responding to other answers.

                              • Making statements based on opinion; back them up with references or personal experience.


                              To learn more, see our tips on writing great answers.




                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function () {
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53399650%2fnot-found-jax-rs%23new-answer', 'question_page');
                              }
                              );

                              Post as a guest















                              Required, but never shown





















































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown

































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown







                              Popular posts from this blog

                              "Incorrect syntax near the keyword 'ON'. (on update cascade, on delete cascade,)

                              Alcedinidae

                              Origin of the phrase “under your belt”?