You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Just Fun 4 You <ju...@nexgo.de> on 2004/04/19 22:46:22 UTC

struts-config broken in multiple files

Hello

I am using Struts 1.1 and tried to separate my struts-config.xml into
several entities as it is described by James Holmes (see below). However it
does not work because the "entity xml files" are not found, though they are
in the same directory as struts-config.xml. After tracing I found out, that
these files are looked up in the tomcat\bin folder rather in the web-inf
directory of the webapp. So how can I make this work without setting
absolute paths?!

thx,
Dirk


<?xml version="1.0" encoding="UTF-8"?>

 <!DOCTYPE struts-config PUBLIC
     "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN" 
     "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd" [

     <!ENTITY form_beans	SYSTEM "form_beans.xml">
     <!ENTITY forwards	SYSTEM "forwards.xml">
     <!ENTITY actions	SYSTEM "actions.xml">

 ]>

 <struts-config>

     <!-- source in <form-bean> defintions -->
     &form_beans;

     <!-- source in <forward> defintions -->
     &forwards;

     <!-- source in <action> defintions -->
     &actions;

 </struts-config>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: struts-config broken in multiple files

Posted by Joe Germuska <Jo...@Germuska.com>.
An alternative to this would be to take advantage of Struts' support 
for defining a list of struts-config files in web.xml.

<init-param>
   <param-name>config</param-name>
     <param-value>
       /WEB-INF/form_beans.xml,
       /WEB-INF/forwards.xml,
       /WEB-INF/actions.xml,
     </param-value>
  </init-param>


-- 
Joe Germuska
Joe@Germuska.com
http://blog.germuska.com
       "Imagine if every Thursday your shoes exploded if you tied them 
the usual way.  This happens to us all the time with computers, and 
nobody thinks of complaining."
             -- Jef Raskin

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org