u123
u123

Reputation: 16267

Creating Java Web application project from scratch using eclipse and tomcat?

I would like to create a new Java Web application targeting latest Tomcat. I would also like to use eclipse, git and 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.

I have downloaded the latest Eclipse for J2EE developers. In the wizard I can chose from the below:

enter image description here

I think the convention I have been working with before was Dynamic Web Project but I am not really sure.

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, e.g using the archetype:

enter image description here

Will a vanilla setup contain more bells and whistles than a maven web app project (e.g. configuration on Tomcat in eclipse)?

Below the top project is a vanilla eclipse project with tomcat 8 configured while the bottom project is a maven web app project. They almost look similar except the tomcat configuration (eclipse wizard):

enter image description here

But it might be a good idea to start with a vanilla eclipse project first.

Upvotes: 1

Views: 1109

Answers (1)

Irfan Khan
Irfan Khan

Reputation: 402

"Dynamic Web Project" is more suitable for your requirements. You can create Servlets/Spring projects and deploy as WAR on Tomcat. You can also convert it to maven project (right click on project -> Configure -> Convert to Maven project)

"Enterprise Application Project" is typically for J2EE with EJB development, you would need J2EE container like Glassfish (Tomcat will not work).

Static web app is for HTML files only.

Upvotes: 3

Related Questions