Why is the default output path for class filess build/classes and not
WebContent/WEB-INF/classes?
What are the benefits of doing so?
What are the disadvantages of switching the output to WEB-INF/classes?

Frank wrote:
> Why is the default output path for class filess build/classes and not
> WebContent/WEB-INF/classes?
> What are the benefits of doing so?
> What are the disadvantages of switching the output to WEB-INF/classes?

This structure keeps source and generated files separate, which is handy
when you need to add the project to a source control system or otherwise
share it (you know to share everything except for the build directory).
It also allows you to have binary classes part of your application
source (you put those in WebContent/WEB-INF/classes directory and they
get added to your classpath) without getting those classes confused with
the classes generated from the source files in your project.

Konstantin Komissarchik schrieb:
> Frank wrote:
>> Why is the default output path for class filess build/classes and not
>> WebContent/WEB-INF/classes?
>> What are the benefits of doing so?
>> What are the disadvantages of switching the output to WEB-INF/classes?
>
> This structure keeps source and generated files separate, which is handy
> when you need to add the project to a source control system or otherwise
> share it (you know to share everything except for the build directory).
> It also allows you to have binary classes part of your application
> source (you put those in WebContent/WEB-INF/classes directory and they
> get added to your classpath) without getting those classes confused with
> the classes generated from the source files in your project.
>
> - Konstantin

thanks for your answer!
If there is no other reason, I'll overwrite the default settings and
generate the class files directly into WEB-INF/classes, because:
(a) putting a .cvsignore file to output or to WEB-INF seems to me the same
(b) I like to use the WebContent folder as webapp folder for tomcat (no
copying to a special webapps directory), so I have to create WEB-INF
classes manually (or by ant) and to remove it before synchronizing with cvs.
(c) the "natural" place for additional classes is (in my opinion) in
WEB-INF/lib as jar