cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "KARR, DAVID" <dk0...@att.com>
Subject RE: Configuring JAX-RS without Spring: specify relative address?
Date Thu, 07 Jun 2012 03:24:28 GMT
> -----Original Message-----
> From: Ron Grabowski [mailto:rongrabowski@yahoo.com]
> Sent: Wednesday, June 06, 2012 8:07 PM
> To: users@cxf.apache.org
> Subject: Re: Configuring JAX-RS without Spring: specify relative
> address?
> 
> I'm using a non-Spring web.xml similar to this:
> 
> 
> <servlet>
>     <servlet-name>HelloWorld</servlet-name>
>     <servlet-
> class>org.apache.cxf.jaxrs.servlet.CXFNonSpringJaxrsServlet</servlet-
> class>
>     <init-param>
>       <param-name>jaxrs.serviceClasses</param-name>
>       <param-value>
>         com.example.jaxrs.AlgorithmService
>       </param-value>
>     </init-param>
>     <init-param>
>         <param-name>jaxrs.providers</param-name>
>            <param-value>
>                com.example.jaxrs.GsonProvider
>            </param-value>
>     </init-param>
>     <init-param>
>           <param-name>jaxrs.extensions</param-name>
>           <param-value>
>             json=application/json
>         </param-value>
>     </init-param>
> </servlet>
> <servlet-mapping>
>     <servlet-name>HelloWorld</servlet-name>
>     <url-pattern>/servicesRest/*</url-pattern>
> </servlet-mapping>

Ah, I see.  Using the url-pattern is a natural fit.

> ________________________________
>  From: "KARR, DAVID" <dk068x@att.com>
> To: "users@cxf.apache.org" <users@cxf.apache.org>
> Sent: Wednesday, June 6, 2012 1:30 PM
> Subject: Configuring JAX-RS without Spring: specify relative address?
> 
> I've developed a handful of CXF JAX-RS services that work with Spring.
> I'm going to have to quickly learn about how to do it in a new service
> that doesn't use Spring.  I've found some of the references that talk
> about this, although they're spread around, and not necessarily
> consistent.
> 
> I think I'd prefer to do as much configuration in the web.xml, as
> opposed to programmatic configuration.  In the example on the wiki, at
> http://cxf.apache.org/docs/jaxrs-services-
> configuration.html#JAXRSServicesConfiguration-
> ConfiguringJAXRSservicesincontainerwithoutSpring , it doesn't even
> mention setting the server address, which in my Spring-based services
> set this with a relative path on the "address" property of the
> "jaxrs:server" element.  How is the server address configured when you
> do it this way?

Mime
View raw message