I'm wondering how you deploy a REST web service to Tomcat.
The code Intellij creates for the "helloworld" service has a "main" method for testing. That works fine, but when I try to add Tomcat into the mix as a separate deployment, it doesn't work at all. I'm clearly doing something wrong and am confused about deploying REST web services under Tomcat.
I'm not sure what's special about port 9998 used in the sample code or if that port was just chosen at (sort-of) random.
Would appreciate any tips on getting the Jersey "HelloWorld" app to run by itself under Tomcat. Doesn't appear to be your typical "Web app" from a deployment perspective.
Indeed, Jersey can be deployed as part of any web app. The Jersey docs unfortunately complicate matters needlessly by wanting to use Maven, and by setting up some test harness outside of a servlet container. A quick search for "example jersey web app" found http://www.ibm.com/developerworks/web/library/wa-aj-tomcat/, which looks like a good starting point. It talks about Jersey 1.0, but you should be able to substitute a current 1.1 version w/o problems.