user1207381
user1207381

Reputation: 581

How to add a WebContent folder to a Eclipse project

I started porting an old Google Web Tools project into Eclipse Oxygen. I've set it up in a "Google Web Tools" project template and it now compiles and runs.

My problem is that there are a lot of static images and html being left off the compiled project. Looking over other projects, it seems a Web-Content folder might be the ideal place to include these components. Unfortunately this is a feature of "Dynamic Web Application" projects. Is there anyway to add a Web-Content (or similar path) to other Eclipse project types?

Upvotes: 3

Views: 10293

Answers (2)

Bruno L.
Bruno L.

Reputation: 525

WebContent default directory has been replaced with /scr/maion/webapp since Eclipse 2021, then add WebContent/ in Properties, Deployment Assembly, Add, Folder

Upvotes: 1

El Hoss
El Hoss

Reputation: 3832

This is quite easy:

  • open the properties of the project and select 'project facts' and select 'Dynamic Web Project'

enter image description here

  • press apply

  • switch to GWT -> web application and change the WAR directory to 'WebContent'

enter image description here

  • apply

  • close the properties

  • copy everything from the war directory to the WebContent directory.

Hope that helps.

Upvotes: 3

Related Questions