I've been trying to use external entities to split my web.xml file to several parts.
It woul've looked something like this:
web.xml:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd" [ <!ENTITY myweblet SYSTEM "weblet.xml"> ] > <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" > ... &myweblet; ... </web-app>
<servlet> <servlet-name>excel</servlet-name> <servlet-class>com.my.class.excel</servlet-class> </servlet>
2006-09-20 16:41:56,159 [ScannerThread] (Log4JLogger.java:119) ERROR - The /WEB-INF/web.xml was not found. java.io.FileNotFoundException: C:\JBOSS\EJBContainer\bin\weblet.xml at org.jboss.net.protocol.file.FileURLConnection.connect(FileURLConnection.java:94) at org.jboss.net.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:103) at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source) at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source) at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source) ...(snip)
Um, sorry, forgot to post version.
I'm using JBoss 4.0.4GA
Tag from log:
JBoss (MX MicroKernel) [4.0.4.GA (build: CVSTag=JBoss_4_0_4_GA date=200605151000)]