Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <blockquote> <p><code>Can i Have a single application with more than one web.xml files?</code></p> </blockquote> <p>It depends on the approach. </p> <p><strong>Approach 1</strong></p> <p>If you are working in an environment where there are certain servlets (I remember I worked on an old project where there was a <code>Minification servlet</code> and its purpose was to minify the JS/CSS at deploy time) and settings like e.g certain user-contraints and realms that you don't want configured on your development environment since you will be working with exploded JS/CSS and you want to bypass basic secuirty constraints configured in the application just for ease of development but you want them all tested out on QA , so it "sort of" of makes sense to have 2 different deployment descriptors configured for the same application. One in which you have only the basic settings to just deploy the application for development and on the other you have all your production settings that you want tested out on QA from A to Z.</p> <p><em>But again, I want to make it clear that you can deploy you application using only ONE deployment descriptor.</em></p> <p><strong>Approach 2</strong></p> <p>Lets say you want your deployment descriptor to be broken down into small parts for plugg-ability purpose like you define your Servlets in one file and you define your securutiy constraints in other file. These files or <code>web-fragments.xml</code> can only work with <a href="https://blogs.oracle.com/swchan/entry/servlet_3_0_web_fragment" rel="nofollow">Servlet3.0</a>. If you look closely to how these fragments are used, at deploy time all these fragments are merged and read by the container as a "single" file (the deployment descriptor). </p> <p><em>So in the end , we again wind up with a SINGLE deployment descriptor for the application.</em></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload