struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Craig McClanahan <>
Subject Re: Split web.xml into multiple files
Date Mon, 03 May 2004 18:37:43 GMT
Prasad, Kamakshya wrote:

>I tried xml entity. It worked though I have few doubts.
>This is part of the xml which have that reference
><?xml version="1.0" encoding="ISO-8859-1"?>
>	web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application
>2.3//EN" ""
>	 [<!ENTITY xmlfrag SYSTEM
>"file:///F:/struts/web/WEB-INF/servlet.xml" >]>
>  <display-name>Struts POC</display-name>
>  <!-- Action Servlet Configuration -->
>  &xmlfrag;
I presume that "</web-app>" goes here?

>The "&xmlfrag" contains the servlet specification and everything is
>working fine but when I start the server it always throw this error.
><May 3, 2004 4:12:55 PM JST> <Error> <HTTP> <BEA-101306> <Could
>resolve entity "null" for the webapp at: "null". Check your DTD
>reference in the corresponding descriptor (web.xml/weblogic.xml).>
>What has to be done to get rid of this error?
Even if this worked, you really don't want to be using absolute paths.  
A more typical scenario would be to put your fragment (say, in a file 
called "action-servlet.xml") in the WEB-INF directory next to web.xml, 
and change the entity declaration to something like:

  <!ENTITY xmlfrag SYSTEM "action-servlet.xml">

This will work *if* your container parses web.xml files in a manner 
where the XML parser knows the absolute URL of the web.xml file itself, 
so that it can resolve relative references.  Tomcat works this way, but 
I don't know if WebLogic does.

>Thanks and Regards,

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message