Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference webcontent and webapp

I've two Spring MVC projects in Eclipse, but the web content is in different positions.

In one app it's located under:

/WebContent

In the other app under:

/src/main/webapp

Why that? What's the difference?

Is there any way I can see how each project was created in order to create a new one in the same fashion?

like image 332
user1883212 Avatar asked Aug 23 '13 22:08

user1883212


People also ask

Is Webapp and WebContent same?

Project directory structure depends on how it was created and the build tool which you are using. If you create by selecting File -> New ->Dynamic web project in eclipse, then you find the /WebContent directory. If it is created using Maven, directory strutcure will be /src/main/webapp.

What is WebContent folder?

WebContent. Contains all of the web resources. For example, the HTML files, JSP files, and image files that are used to create a web application. If files are not placed in this directory, or in a subdirectory, the files are not available when the web application runs on a server.


1 Answers

Project directory structure depends on how it was created and the build tool which you are using.

If you create by selecting File -> New ->Dynamic web project in eclipse, then you find the /WebContent directory.

If it is created using Maven, directory strutcure will be /src/main/webapp.

Please go throuh here for more information on Maven project strutcure.

like image 185
Sanjeev Avatar answered Oct 07 '22 16:10

Sanjeev