struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Prasad, Kamakshya" <>
Subject RE: Split web.xml into multiple files
Date Mon, 03 May 2004 07:17:39 GMT

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 -->

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?

Thanks and Regards,

-----Original Message-----
From: Craig McClanahan [] 
Sent: Monday, May 03, 2004 3:57 PM
To: Struts Users Mailing List
Subject: Re: Split web.xml into multiple files

Prasad, Kamakshya wrote:

>We are using the container managed security and we have lot of action
>mapping and roles. Specifying them in one web.xml making it too huge.
>want it to split into separate logical files
If your container is reasonably intelligent about parsing XML documents 
using entities that refer to files in the same directory, this should be

no problem using XML entities for this sort of thing.  Check the Struts 
documentation, Wiki, and mailing list archives for discussions of 
dividing up a struts-config.xml file -- exactly the same techniques will

generally work for web.xml as well.

On the other hand, it makes a *lot* more sense to me to create a build 
environment that dynamically combines all the stuff you need into a 
single web.xml file, to be included in the deployable WAR file, as part 
of the build process.


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

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

View raw message