<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.5730.11" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff><SPAN class=postbody>Hello <BR><BR>I have a problem with
multiples wars. <BR>My JboosPortal version is: 2.2.1RC3 <BR><BR>My classes are
shared, but my jboss-web.xml is: <BR><BR></SPAN>
<TABLE cellSpacing=1 cellPadding=3 width="90%" align=center border=0>
<TBODY>
<TR>
<TD><SPAN class=genmed><B><FONT color=#008000></FONT></B></SPAN></TD></TR>
<TR>
<TD class=code><PRE><FONT color=#008000><class-loading java2ClassLoadingCompliance="false">
<loader-repository>
com.sumersoft:loader=demo
<loader-repository-config>
java2ParentDelegation=false
</loader- repository-config>
</loader-repository>
</class-loading></FONT>
        </PRE></TD></TR></TBODY></TABLE><SPAN class=postbody><BR><BR><BR>I see the
problem when I try load one .properties that it is inside of war. <BR>Each war
it has a different file .properties, with equals name but with <BR>different
content. <BR><BR>In my class that load .properties this code is used:
<BR><BR></SPAN>
<TABLE cellSpacing=1 cellPadding=3 width="90%" align=center border=0>
<TBODY>
<TR>
<TD><SPAN class=genmed><B></B></SPAN></TD></TR>
<TR>
<TD class=code><PRE><FONT color=#008000>public class CommonInformationPortal implements ServletContextListener {
        
        private static Properties properties = null;
        public static void load()
        {
                try{
                        if(properties == null)
                        {
                                properties = new Properties();
                                properties.load(Thread.currentThread().getContextClassLoader().getResourceAsStream("CommonInformation.properties"));
                        }
                }
                catch(Exception e)
                {
                        return;
                }
        }
        
        
        public static String getProperty(String property) {
                try{
return properties.getProperty(property);
                }
                catch(Exception e)
                {
                        return null;
                }
        }
}</FONT>
        </PRE></TD></TR></TBODY></TABLE><SPAN class=postbody><BR>But always return the
ClassLoader of last deployed war. <BR>So the file .properties read is always the
file of last deployed war. <BR><BR>I try use ServletContextListener the load of
file .properties is ok, but when I get any propertie of this file is returned
propertie of last deployed war. <BR><BR>How i can resolve this
problem?<BR><BR>[]īs<BR>Eros</SPAN>
<DIV><FONT face=Arial size=2></FONT> </DIV></BODY></HTML>