Can you add web features to an existing Java project?
Also, this is how to convert a Java project by editing the .project file (different from the way I remember how it was done in Eclipse). This may give some insight into how to modify the .project file.
docs seem to indicate that JavaSource is a property that dictates your Java source files for dynamic web projects.
JavaSource Contains the Java project source code for classes, beans, and servlets. When these resources are added to the web project, they are automatically compiled, and the generated files are added to the WEB-INF / classes directory. The contents of the source directory are not packaged into WAR files unless specified when the WAR file is created. Note. Although the default name for the folder is JavaSources, you can change the name by right-clicking on the name in Project Explorer and clicking Refactor> Rename.
In addition, I think, since Dynamic Web Project must adhere to J2EE standards, you cannot change the path to the output folder in your project. However, you can rename it if you want.
WebContent folder Required location of all web resources, including HTML, JSP, image files, etc. If the files do not fit in this directory (or in the subdirectory structure in this directory), the files will not be available if the application is running on the server. The web content folder is the contents of the WAR file that will be deployed to the server. Any files that are not in the web content folder are considered development-time resources (for example, .java files, .sql files and .mif files) and are not deployed when testing or publishing a project. Note. Although the default name for the folder is WebContent, you can change the name in Project Explorer by right-clicking the folder and selecting "RefactorRename" or on the web page of the Project Properties dialog box. In a dynamic web project, changing the folder name will update the Java build output directory.
source share