[weld-commits] Weld SVN: r6991 - archetypes/javaee6-webapp/trunk/src/main/java/com/mycompany.

weld-commits at lists.jboss.org weld-commits at lists.jboss.org
Thu Aug 19 22:36:46 EDT 2010


Author: dan.j.allen
Date: 2010-08-19 22:36:46 -0400 (Thu, 19 Aug 2010)
New Revision: 6991

Modified:
   archetypes/javaee6-webapp/trunk/src/main/java/com/mycompany/JaxRsActivator.java
Log:
document modifications required to get JAX-RS working on JBoss AS 6.0.0.M4


Modified: archetypes/javaee6-webapp/trunk/src/main/java/com/mycompany/JaxRsActivator.java
===================================================================
--- archetypes/javaee6-webapp/trunk/src/main/java/com/mycompany/JaxRsActivator.java	2010-08-20 02:36:19 UTC (rev 6990)
+++ archetypes/javaee6-webapp/trunk/src/main/java/com/mycompany/JaxRsActivator.java	2010-08-20 02:36:46 UTC (rev 6991)
@@ -4,13 +4,35 @@
 import javax.ws.rs.core.Application;
 
 /**
- * This empty, annotated {@link Application} class is the Java EE 6 "no XML"
- * approach to activate JAX-RS. Resources are served from the servlet path
- * specified in the @ApplicationPath annotation.
- * 
- * NOTE As of JBoss AS 6.0.0.M3, JAX-RS does not activate properly.
+ * A class extending {@link Application} and annotated with @ApplicationPath
+ * is the Java EE 6 "no XML" approach to activating JAX-RS.
+ *
+ * <p>Resources are served relative to the servlet path specified in the {@link
+ * ApplicationPath} annotation.</p>
+ *
+ * <p><strong>NOTE</strong><br/>The following modifications are required to get
+ * JAX-RS working on JBoss AS 6.0.0.M4:</p>
+ *
+ * <ol>
+ * <li>Remove (or comment out) the <code>extends Application</code> clause on this class</li>
+ * <li>Remove (or comment out) the <code>@ApplicationPath</code> annotation on this class</li>
+ * <li>Open up web.xml and add the following XML snippet:
+ * <pre>
+ * &lt;context-param&gt;
+ *    &lt;param-name&gt;resteasy.scan&lt;/param-name&gt;
+ *    &lt;param-value&gt;true&lt;/param-value&gt;
+ * &lt;/context-param&gt;
+
+ * &lt;context-param&gt;
+ *    &lt;param-name&gt;resteasy.servlet.mapping.prefix&lt;/param-name&gt;
+ *    &lt;param-value&gt;/rest&lt;/param-value&gt;
+ * &lt;/context-param&gt;
+ * </pre>
+ * <p>The mapping prefix should match the value that was in the <code>@ApplicationPath</code> annotation, prefixed
+ * with a forward slash (/).</p></li>
+ * </ol>
  */
- at ApplicationPath("/rest")
+ at ApplicationPath("rest")
 public class JaxRsActivator extends Application
 {
    /* class body intentionally left blank */



More information about the weld-commits mailing list