title: Where to put DTD and schema files
body: <p>I have a fairly typical JavaEE application, composed using EJB3, seam components, spring beans and JSF, all packaged into several jar and war files inside an ear file. Naturally for JavaEE, we have many XML files as part of the application. Some of these XML files are validated using DTD (seam) and some using schema.</p>
  
  <p>As most files where taken from the examples and from other projects, all DTDs and schemas refer to the project's site, where the default DTD or schema resides. Here comes the problem: For some reason, the JBoss site misses the seam DTDs today (Check <a href="http://www.jboss.com/products/seam/components-1.1.dtd" rel="nofollow noreferrer">http://www.jboss.com/products/seam/components-1.1.dtd</a>, <a href="http://www.jboss.com/products/seam/components-1.2.dtd" rel="nofollow noreferrer">http://www.jboss.com/products/seam/components-1.2.dtd</a>, <a href="http://www.jboss.com/products/seam/components-2.0.dtd" rel="nofollow noreferrer">http://www.jboss.com/products/seam/components-2.0.dtd</a>). Since the JBoss server validates the XML at bootstrap using this location, the application deployment failed. </p>
  
  <p>My question is this: Given this case, where should I put the DTD and definition files? I see three options:</p>
  
  <ol>
  <li>Use the default location, as I did before. As it means I now add the stability of the JBoss, Sun, Spring and any other vendor into my system in case I need to re-deploy the application, I prefer not to do so.</li>
  <li>Copy all DTD and schema files to my server, having the URLS point to a server under my control.</li>
  <li>Copy all DTD and schema files to my application or app server, and use them locally. </li>
  </ol>
  
  <p>I tend to use option #3, as it provides full control on the files, without network dependencies. In test we've done, it even significantly reduced the bootstrap time of the server - apperently the XML parser does not cache the definitions. Is there anyhing I miss by taking this path?</p>