The Eclipse Web Tools Platform (WTP) currently assumes that all Java
classes built within a Dynamic Web Project (and as a result, SAS
Web Application Projects) are intended to be deployed under
the Web application's WEB-INF/classes directory.
Also, any JAR files to be deployed are assumed to belong in the WEB-INF/lib
directory. If you are working with applets or Java Web Start
applications, you might need to place Java classes and JAR files
in the Web content portion of a Web application project.
Unfortunately, the WTP does not officially support placing classes
and JAR files in a Web application project.
This is because there is no user interface within the WTP
that supports the creation of additional Web content folders in a
Dynamic Web Project. Since it is not advisable to place built
artifacts into the primary Web content folder of the project, you have to
create new Web content folders and manually add them by editing the
"component" file that is found in the .settings
folder of the project. (The actual file name varies depending on which
version of Web Tools Platform created the project.)
Creating new Java source folders with their own separate build folders enables you to have the needed project configuration. Follow these steps:
.settings folder for the project and
open the .component or org.eclipse.wst.common.component
file, whichever one exists.wb-resource element whose source-path
attribute is set to the new Java source folder.
source-path attribute to specify
the new output folder.deploy-path attribute to be a forward slash
or another suitable deployment location..component file or the
org.eclipse.wst.common.component file.The Java classes placed in the new Java source folder will be included in the content portion of the Web application when it is published to a server or exported as a WAR file.