You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Gr...@emc.com on 2008/11/05 20:32:19 UTC

Libs needed for Servlet deployment of JAX-RS

Hi Guys:
I am struggling to figure out what libraries I need in WEB-INF/lib
directory for a simple Apache Tomcat deployment of CXF as a servlet.

I am using the web.xml as published in
http://cwiki.apache.org/CXF20DOC/jax-rs-jsr-311.html

<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
	<context-param>
		<param-name>contextConfigLocation</param-name>
		<param-value>WEB-INF/beans.xml</param-value>
	</context-param>

	<listener>
		<listener-class>
	
org.springframework.web.context.ContextLoaderListener
		</listener-class>
	</listener>

	<servlet>
		<servlet-name>CXFServlet</servlet-name>
		<display-name>CXF Servlet</display-name>
		<servlet-class>
			org.apache.cxf.transport.servlet.CXFServlet
		</servlet-class>
		<load-on-startup>1</load-on-startup>
	</servlet>

	<servlet-mapping>
		<servlet-name>CXFServlet</servlet-name>
		<url-pattern>/*</url-pattern>
	</servlet-mapping>
</web-app>

FWIW, I am using the internal Tomcat in Eclipse, I have the build path
set up rather generously (all the CXF libs are in the build path).
However, when I start up Tomcat, I get a classnotfound exception (can't
find the ContextLoaderListener).

Thanks in advance for the help.

sgg

Re: Libs needed for Servlet deployment of JAX-RS

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

Looks like spring-web.jar is missing ? 

You might want to look at the pom for a jaxrs bundle too :

http://svn.apache.org/repos/asf/cxf/trunk/distribution/bundle/jaxrs/pom.xml

Cheers, Sergey

----- Original Message ----- 
From: <Gr...@emc.com>
To: <us...@cxf.apache.org>
Sent: Wednesday, November 05, 2008 7:32 PM
Subject: Libs needed for Servlet deployment of JAX-RS


Hi Guys:
I am struggling to figure out what libraries I need in WEB-INF/lib
directory for a simple Apache Tomcat deployment of CXF as a servlet.

I am using the web.xml as published in
http://cwiki.apache.org/CXF20DOC/jax-rs-jsr-311.html

<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>WEB-INF/beans.xml</param-value>
</context-param>

<listener>
<listener-class>

org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>

<servlet>
<servlet-name>CXFServlet</servlet-name>
<display-name>CXF Servlet</display-name>
<servlet-class>
org.apache.cxf.transport.servlet.CXFServlet
</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>

<servlet-mapping>
<servlet-name>CXFServlet</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
</web-app>

FWIW, I am using the internal Tomcat in Eclipse, I have the build path
set up rather generously (all the CXF libs are in the build path).
However, when I start up Tomcat, I get a classnotfound exception (can't
find the ContextLoaderListener).

Thanks in advance for the help.

sgg