Search code examples
java-ee-6web.xml

Java EE 6 how can I change the default location of my web.xml file?


I was to use a custom directory structure for my Java EE 6 application. How do I make this change while keeping my project functional?


Solution

  • You can't override this location, it's "hard-coded" in the specification. The Servlet specification 3.0 says:

    10.5 Directory Structure

    The contents of the WEB-INF directory are:

    • The /WEB-INF/web.xml deployment descriptor.

    And nothing more about alternative locations.