WebContent folder does not exist, webapp instead

930 views Asked by At

I'm taking the following course right now: "Develop websites with Java EE". I encounter a problem when creating the Dynamic Web Project because instead of having a WebContent folder like on all the tutorials I've seen, I get a src/main folder... What should I do to be able to have a WebContent folder

2

There are 2 answers

1
zawarudo On BEST ANSWER

The Eclipse for some reason replaced WebContent with webapp folder. It is basically a replacement for it, but if you really want WebContent you can download 2017 version. Here is the one that I have Eclipse Java EE IDE for Web Developers.

Version: Oxygen.1a Release (4.7.1a) Build id: 20171005-1200

https://www.eclipse.org/downloads/packages/release/oxygen/1a

https://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/oxygen/1a/eclipse-jee-oxygen-1a-win32-x86_64.zip

After this version WebContent is replaced with webapp

Here is also a picture of the project structure if you have an eclipse that creates webapp or WebContent, as you can see it is basically a replacement to make it look more like maven structure.

enter image description here

3
nitind On

"WebContent" was replaced to form a layout more easily transitioned to building a .war file with headless tools like Gradle and Maven. No one should be deploying to a production environment from their IDE. "WebContent" was also fairly unique to Eclipse's Web Tools. There's nothing special about it.

You don't need an older version, only to enter a different value when the New Dynamic Web Project wizard asks you what you want to use as your Content Directory on the third page of the wizard (if you don't want to use the new default):

Page 3 in the New Dynamic Web Project wizard