hello everyone! 

I try to define some external entities in the web.xml in order to use some 
defult values in one other xml that is stored in server\default\conf\config.xml.

I achieve this, with the below declaration:

web.xml

  | <!DOCTYPE web-app
  |     PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
  |     "http://java.sun.com/dtd/web-app_2_3.dtd";[
  |    <!ENTITY config SYSTEM "file:/C:/jboss/server/default/conf/config.xml">
  | ]>
  |  
  | <web-app>
  | &config; 
  | ...
  | </web-app>
  | 

The problem is the absolute path. When you have many jboss AS with different 
setup properties, like:

  | jboss AS 1: C:/jboss/
  | jboss AS 2: D:/jboss/
  | jboss AS 3: F:/AS/jboss
  |  the absolute paths are big trouble. (this solution is ignored)
  | 
  | The other solution is the relative path:
  | 
  |   | <!DOCTYPE web-app
  |   |     PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
  |   |     "http://java.sun.com/dtd/web-app_2_3.dtd";[
  |   |    <!ENTITY config SYSTEM "../config.xml">
  |   | ]>
  |   | 
  | but it is not so good, because the external xml (config.xml) must be inside 
the war application. (this solution is ignored)
  | 
  | The third solution is to create an other application (config-app) that 
contains the config.xml.
  | 
  |   | <!DOCTYPE web-app
  |   |     PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
  |   |     "http://java.sun.com/dtd/web-app_2_3.dtd";[
  |   |    <!ENTITY security-constraints SYSTEM 
"http://localhost:8080/config-app/config.xml"";>
  |   | ]>
  |   |  but the problem is that the application config-app can't start because 
the application1 try to get the file conf.xml. The server goes on waiting 
state.  (this solution is ignored)
  | 
  | Could you help me to find an other acceptable solution?
  | 
  | Thanks in advance!
  | John 
  | 
  | 

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4181218#4181218

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4181218
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to