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.
Ping & DNS - updated with new look and Ping home screen widget
Joined: Jul 12, 2002
Bear Bibeault wrote:(Me again.) It should be. There's no reason for it not to be a typical JEE web app.
Personally, I use IntelliJ as an editor on steroids, but run a standalone Tomcat instance.
Yeah, I'm trying to use Intellij also. I love Intellij once the project is set up -- as an editor that really "knows my code" and does excellent refactoring, etc.. Best editor available, IMHO.