[jbosstools-issues] [JBoss JIRA] (JBIDE-15664) Application path configured in web.xml causes warning

Radoslav Rábara (JIRA) jira-events at lists.jboss.org
Mon Oct 14 08:28:36 EDT 2013


     [ https://issues.jboss.org/browse/JBIDE-15664?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Radoslav Rábara updated JBIDE-15664:
------------------------------------

    Steps to Reproduce: 
STEP: Create Dynamic Web Project with deployment descriptor(web.xml) and add JAX-RS support
STEP: Create JAX-RS Activator class like this:
{code:title=App.java|borderStyle=solid}
package test;

import javax.ws.rs.core.Application;

public class App extends Application {

}
{code}
ASSERT: There is 1 error:
The Application Path should be configured with an @ApplicationPath annotation or in the web deployment descriptor.
STEP: Configure the application path in web.xml - open web.xml and add servlet mapping.
The web.xml will look like this:
{code:borderStyle=solid}
<?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" 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">
  <servlet-mapping>
  <servlet-name>test.App</servlet-name>
  <url-pattern>/test</url-pattern>
  </servlet-mapping>
</web-app>
{code}
ASSERT: There is no error or warning.
FAIL: There is one warning: (resource is web.xml)
Multiple JAX-RS Activators are defined for the project.



  was:
STEP: Create Dynamic Web Project with deployment descriptor(web.xml) and add JAX-RS support
STEP: Create JAX-RS Activator class like this:
{code:title=App.java|borderStyle=solid}
package test;

import javax.ws.rs.core.Application;

public class App extends Application {

}
{code}
ASSERT: There is 1 error:
The Application Path should be configured with an @ApplicationPath annotation or in the web deployment descriptor.
STEP: Configure the application path in web.xml - open web.xml and add servlet mapping.
The web.xml will look like this:
{code:borderStyle=solid}
<?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" 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">
  <servlet-mapping>
  <servlet-name>test.App</servlet-name>
  <url-pattern>/test</url-pattern>
  </servlet-mapping>
</web-app>
{code}
ASSERT: There is no error or warning.
FAIL: There is one warning: (resource web.xml)
Multiple JAX-RS Activators are defined for the project.




    
> Application path configured in web.xml causes warning
> -----------------------------------------------------
>
>                 Key: JBIDE-15664
>                 URL: https://issues.jboss.org/browse/JBIDE-15664
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: webservices
>    Affects Versions: 4.1.1.Alpha2
>            Reporter: Radoslav Rábara
>
> If you configure application path in web.xml instead of using annotation @ApplicationPath, you get warning Multiple JAX-RS Activators are defined for the project.
> This bug is probably related to JBIDE-15402 or maybe to JBIDE-12860.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the jbosstools-issues mailing list