WebContent folder in a Java Dynamic Web project in Eclipse

3.5k views Asked by At

I have attempted to import an existing WAR file into my Eclipse Helios IDE. My understanding was that the folder structure of the WAR file was not too import apart from the WEB-INF directory.

However, when I imported the WAR folder structure in Eclipse and subsequently deployed the project, no web pages were reachable UNLESS I placed all the JSP pages under the WebContent directory of my project.

The original WAR file did not have a WebContent directory so am not sure why this directory suddenly becomes critical in Eclipse. How does Eclipse use this directory compared to my original WAR file?

1

There are 1 answers

1
Grim On

WAR != Java Dynamic Web project.

A WAR is a web archive, a Java Web Project is much more (like ant-files, java-sourcecode, unit-tests ...). To keep it simple the subdirectory was created.

The contents of WebContent and the WAR should be sync.