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
-
Welcome to Stack Overflow! Please provide specific information about that attempt. To learn more about this community and how we can help you, please read [ask] and its linked resources. Could you provide a minimal reproducible example? – HoRn Oct 04 '22 at 18:05
2 Answers
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
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.

- 1,907
- 2
- 10
- 20
-
Please do not install an older version as a solution. You can swap folders using the **Deployment Assembly** property page. – nitind Feb 27 '23 at 14:23
"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):

- 19,089
- 4
- 34
- 43
-
How do you reverse thing if you only noticed this that there is no longer a Web Content but I'd need a Web Content to follow thru a tutorial ? – Karen Goh Feb 27 '23 at 08:54
-
@KarenGoh Create your WebContent directory, and use the project's **Deployment Assembly** property page to designate it as a folder that deploys to '/'. – nitind Feb 27 '23 at 14:21
-
Tks but i found out Jakarata ee is really what I need since i am using java 17 so there is no way to follow that tutorial wholesale. Tks for your reply though. – Karen Goh Feb 27 '23 at 14:31