简体   繁体   English

使用eclipse和tomcat从头开始创建Java Web应用程序项目?

[英]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.

相关问题 获取Eclipse项目的绝对路径(在使用tomcat服务器的Web应用程序中) - getting eclipse project absolute path (in web application using tomcat server) Eclipse Dynamic Web Project Link CSS from JSP using Tomcat - Eclipse Dynamic Web Project Link CSS from JSP using Tomcat 使用tomcat在eclipse外部运行Web项目 - running a web project outside eclipse using tomcat 无法将Web应用程序从Eclipse部署到tomcat - Cannot deploy Web application to tomcat from Eclipse 如何在不使用Eclipse的情况下从终端为我的Java Web应用程序项目创建War文件 - How to create a war file for my java web application project from terminal without using eclipse 使用Tomcat在Eclipse中启动Java Project - Starting Java Project in eclipse using Tomcat 在Tomcat中使用来自Java Web应用程序的OSGi Bundle - Using an OSGi Bundle from a Java Web Application in Tomcat 在 Tomcat 上运行 Web 应用程序项目时更改 Eclipse 打开的 URL - Change URL opened by Eclipse when running web application project on Tomcat 如何在Eclipse中打开现有的tomcat Web应用程序项目 - How to open existing tomcat web application project in eclipse 如何将使用eclipse和tomcat构建的Java EE项目部署到万维网? - How to deploy a Java EE project built using eclipse with tomcat to world wide web?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM