Hi all I am trying a very simple Jersey 1.12/Tomcat 7/Java 7u15 project in IntelliJ.
I set it up with Web, Rest, Spring and Tomcat. I have one service class
public class FWPService
public String getTest()
return "TEST WORKED";
And a simple web.xml file
However, when I try to run the project one of thwo things happen
1) If I have the Jersey Jar in the 'Available Elements' of the project artiacts configuration section, then Jersey does not seem to start at all and I get the following error when I go to localhost:8080/fwp/test
HTTP Status 404 -
type Status report
description The requested resource is not available.
2) However if I move the Jersey jar into the lib directory of the web service then the webapp starts up with the following error
INFO: validateJarFile(/Users/conrad/FWPServerJava/out/artifacts/FWPServerJava_war_exploded/WEB-INF/lib/grizzly-servlet-webserver-1.9.45.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
Apr 15, 2013 7:41:23 AM com.sun.jersey.api.core.PackagesResourceConfig init
INFO: Scanning for root resource and provider classes in the packages:
But I am able to see the string "TEST WORKED" at the right url localhost:8080/fwp/test
In the dependenies for the module I have the Jersey jar set to 'compile' scope.
Can anybody help? This is the standard setup that IntelliJ created when I made the project.