users@jersey.java.net

PackagesResourceConfig <was> Re: ServletContainer jar scanning exception

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Tue, 08 Jan 2008 16:19:41 +0100

Paul Sandoz wrote:
> No, I can implement that.
>

Done. Tis in the latest build.

I did some refactoring:

"webresourceclass" ->
   "com.sun.ws.rest.config.property.resourceConfigClass"

"com.sun.ws.rest.config.property.ResourcePaths" ->
   "com.sun.ws.rest.config.property.classpath"

DynamicResourceConfig ->
   ClasspathResourceConfig

and improved the logging details.

If you want to use PackagesResourceConfig with web.xml you would set the
following init parameters:

   <init-param>
<param-name>com.sun.ws.rest.config.property.resourceConfigClass</param-name>
<param-value>com.sun.ws.rest.api.core.PackagesResourceConfig</param-value>
   </init-param>
   <init-param>
<param-name>com.sun.ws.rest.config.property.packages</param-name>
<param-value>com.acme.myresources;com.foo.myresources</param-value>
   </init-param>

The java doc of the following contains all the information:

   com.sun.ws.rest.spi.container.servlet.ServletContainer
   com.sun.ws.rest.api.core.ClasspathResourceConfig
   com.sun.ws.rest.api.core.PackagesResourceConfig

Paul.

-- 
| ? + ? = To question
----------------\
    Paul Sandoz
         x38109
+33-4-76188109