You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Ian Upright <ia...@upright.net> on 2010/02/17 21:26:06 UTC

deploying a jax_rs sample as a .war for tomcat?

Hello,

Lets take the jax_rs\basic sample.  How would one go about deploying all the
classes in the server as a tomcat .war file, for example?

I'm not sure what the cxf-servlet.xml would look like.

Are there any examples of this anywhere?

Thanks, Ian

Re: deploying a jax_rs sample as a .war for tomcat?

Posted by Sergey Beryozkin <sb...@progress.com>.
Hi

If you'd like to use Spring to configure a jaxrs endpoint then you can use CXFServlet otherwise you can use a 
CXFNonSpringJaxrsServlet.

JAXWS java_first_spring_support shows the use of CXFServlet :
http://svn.apache.org/repos/asf/cxf/trunk/distribution/src/main/release/samples/java_first_spring_support/webapp/WEB-INF/web.xml

Here's some more info :
http://cxf.apache.org/docs/jax-rs.html#JAX-RS-ConfiguringJAXRSservicesincontainerwithSpringconfigurationfile.
http://cxf.apache.org/docs/jax-rs.html#JAX-RS-ConfiguringJAXRSservicesincontainerwithoutSpring

It's probably worth adding war and deploy targets to some of the demos' build files so that a packaged war could be deployed into a 
running container...

hope it helps, Sergey

----- Original Message ----- 
From: "Ian Upright" <ia...@upright.net>
To: <us...@cxf.apache.org>
Sent: Wednesday, February 17, 2010 8:26 PM
Subject: deploying a jax_rs sample as a .war for tomcat?


Hello,

Lets take the jax_rs\basic sample.  How would one go about deploying all the
classes in the server as a tomcat .war file, for example?

I'm not sure what the cxf-servlet.xml would look like.

Are there any examples of this anywhere?

Thanks, Ian