简体   繁体   English

使用Maven Eclipse和Tomcat Server设置RESTFull Web应用程序项目

[英]Setting up RESTFull web app project using Maven Eclipse and Tomcat Server

So I have been trying to create a new RESTfull web application project in eclipse that will use the Jersey Jax-rs framework and work on a tomcat server. 因此,我一直在尝试在eclipse中创建一个新的RESTfull Web应用程序项目,该项目将使用Jersey Jax-rs框架并在tomcat服务器上工作。 So far i have been able to create the project in eclipse and add the jersey dependencies , but I am missing files like web.xml so I am unsure weather I am doing this properly. 到目前为止,我已经能够在eclipse中创建项目并添加jersey依赖项,但是我缺少web.xml之类的文件,因此不确定我是否能正确执行此操作。

Would somebody with experience in this field that perhaps does this often give me a step by step walkthrough of the steps involved to see what I am missing as im sure its not complicated im just brand new to this so its all confusing . 在这个领域有经验的人可能会这样经常让我一步一步地了解所涉及的步骤,看看我错过了什么,因为我确定它并不复杂,我只是全新的,所以这一切都令人困惑。

I want to use jersey and the jersey test framework. 我想使用球衣和球衣测试框架。

Thanks in advance Chris 预先感谢克里斯

This is the tutorial I used - and this is quite simple. 这是我使用的教程-这很简单。

http://www.suryasuravarapu.com/2009/02/rest-jersey-configuration-on-tomcat.html http://www.suryasuravarapu.com/2009/02/rest-jersey-configuration-on-tomcat.html

and let us know if anything is not working. 如果有什么不起作用,请告诉我们。

When you create a "Dynamic Web Project" in "Eclipse IDE for Java EE developers" , it will make a basic web.xml for you - so just add the <servlet> and <servlet-mapping> tags as needed 当您在“Eclipse IDE for Java EE开发人员”中创建“动态Web项目”时,它将为您创建一个基本的web.xml - 所以只需根据需要添加<servlet><servlet-mapping>标记

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM