[英]Creating Java Web application project from scratch using eclipse and tomcat?
I would like to create a new Java Web application targeting latest Tomcat. 我想创建一个针对最新Tomcat的新Java Web应用程序。 I would also like to use eclipse, git and maven. 我还想使用eclipse,git和maven。
I have been working with WAR and EAR projects before but they were always years in development and I have never created one from scratch. 我以前一直在使用WAR和EAR项目,但他们总是在开发多年,我从来没有从头创建过。
I have downloaded the latest Eclipse for J2EE developers. 我已经下载了最新的Eclipse for J2EE开发人员。 In the wizard I can chose from the below: 在向导中我可以从下面选择:
I think the convention I have been working with before was Dynamic Web Project but I am not really sure. 我认为之前我一直在使用的约定是动态Web项目,但我不太确定。
Is it possible to summarize very shortly which project type I most likely need to select? 是否有可能很快总结出我最有可能选择的项目类型?
I am also used to working with maven so at some point I assume I also need to mavenize the project, eg using the archetype: 我也习惯和maven一起工作所以在某些时候我认为我还需要对项目进行整理 ,例如使用原型:
Will a vanilla setup contain more bells and whistles than a maven web app project (eg configuration on Tomcat in eclipse)? vanilla设置是否包含比maven web应用程序项目更多的铃声和口哨声(例如eclipse中Tomcat上的配置)?
Below the top project is a vanilla eclipse project with tomcat 8 configured while the bottom project is a maven web app project. 顶级项目下面是一个配置了tomcat 8的vanilla eclipse项目,而底层项目是一个maven web app项目。 They almost look similar except the tomcat configuration (eclipse wizard): 除了tomcat配置(eclipse向导)之外,它们看起来几乎相似:
But it might be a good idea to start with a vanilla eclipse project first. 但是首先从一个vanilla eclipse项目开始可能是一个好主意。
"Dynamic Web Project" is more suitable for your requirements. “动态Web项目”更适合您的要求。 You can create Servlets/Spring projects and deploy as WAR on Tomcat. 您可以创建Servlets / Spring项目并在Tomcat上部署为WAR。 You can also convert it to maven project (right click on project -> Configure -> Convert to Maven project) 您还可以将其转换为maven项目(右键单击项目 - >配置 - >转换为Maven项目)
"Enterprise Application Project" is typically for J2EE with EJB development, you would need J2EE container like Glassfish (Tomcat will not work). “企业应用程序项目”通常用于J2EE开发的J2EE,您需要像Glassfish这样的J2EE容器(Tomcat不起作用)。
Static web app is for HTML files only. 静态Web应用程序仅适用于HTML文件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.