Aod Ren Aod Ren -3 years ago 117
Java Question

Isn't web.xml supposed to be included when building maven project ? NetBeans

I made a new Maven project with Netbeans. There is a

in which i added:







Is it normal if I don't have a web.xml in my project tree after building the project or should i treat the glassfish.xml just the same ?

enter image description here

I wonder if I didn't messed up things.

Answer Source

Java EE 6 made web.xml optional (traded in for a bunch of annotation-based configurations). If maven knows that Java EE 6 is the version, then it won't complain about a missing web.xml.

You should be able to configure for the most part using annotations. For portability's sake, use web.xml IF NEEDED rather than relying on vendor-specific configuration files.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download