You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by maziz_ca <ma...@yahoo.com> on 2003/11/18 15:47:00 UTC

ModuleConfig Question

Hello all,

I have been asked to create an Action that would dynamically modify 
struts-config.xml and ModuleConfig in order to avoid restarting the 
app server to read the new struts.config.xml. I did some research and 
looking at the code in the ModuleConfig implementation, it always 
checks the value of the "configured" flag, if it is set to true, no 
modification is allowed. My first question: is what I am trying to do 
possible?? if the answer is yes, how would I go about accomplishing 
it?? 

Here are my thoughts. First, I have to create my own implementation 
of ModuleConfig that allows modification after the initial setup. 
Next, I have to let struts use that implementation. That can probably 
be done by using the ModuleConfigFactory class. However, how do I 
make struts pass my class instead ofthe default implementation to the 
Factory?? I came across a message that mentioned something about 
adding a parameter to web.xml which specifies the implementation 
class for ModuleConfig but that is not in the current release.

Any help/advice/insight into this will be greatly appreciated.

Thanx.

- Marwan



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


Re: struts printing debug mesg regardless what I did

Posted by Manish Singla <Ma...@Sun.COM>.
Since you are setting
 >>>>log4j.rootLogger=warn, rolling
 >>>>log4j.category.org.apache=warn, rolling

Thus, you should not see DEBUG messages of "commons".

Problem is somewhere else.

HTH
Manish Singla

PS:: Setting debug level in web.xml i.e. <init-param> .... is deprecated.
Thus, I will configure logging detail by using config file of underlying 
  logging implementation as above.



david chan wrote:
> Tried both, not working.
> 
> David
> 
> --- Richard Yee <ry...@yahoo.com> wrote:
> 
>>David,
>>Set
>>    <init-param>
>>      <param-name>debug</param-name>
>>      <param-value>0</param-value>
>>    </init-param>
>>
>>in the web.xml for your action servlet.
>>
>>-Richard
>>
>>--- Kevin Hagel <kh...@mminternet.com> wrote:
>>
>>>log4j.category.org.apache.common=WARN
>>>
>>>----- Original Message ----- 
>>>From: "david chan" <da...@yahoo.com>
>>>To: "Struts Users Mailing List"
>>><st...@jakarta.apache.org>
>>>Sent: Wednesday, December 03, 2003 9:39 AM
>>>Subject: struts printing debug mesg regardless
>>
>>what
>>
>>>I did
>>>
>>>
>>>
>>>>Hi,
>>>> I am using Struts 1.1 and log4j 1.2.4, and in
>>>
>>my
>>
>>>>log4j.properties, I have this to turn off Struts
>>>
>>>debug
>>>
>>>>mesg, but it always printing debug mesg for
>>>
>>>package
>>>
>>>>org.apache.common. How can I turn it off?
>>>>Thanks.
>>>>David
>>>>
>>>>===my log config ===
>>>>log4j.rootLogger=warn, rolling
>>>>log4j.category.org.apache=warn, rolling
>>>>
>>>
> log4j.appender.rolling=org.apache.log4j.RollingFileAppender
> 
>>>>log4j.appender.rolling.File=c:\\temp\\temp.log
>>>>
>>>>log4j.appender.rolling.MaxFileSize=5000KB
>>>>log4j.appender.rolling.MaxBackupIndex=5
>>>>
>>>>
>>>
> log4j.appender.rolling.layout=org.apache.log4j.PatternLayout
> 
>>log4j.appender.rolling.layout.ConversionPattern=%d
>>
>>>%5p
>>>
>>>>[%t] %c{2} - %m%n
>>>>====== end log config ====
>>>>
>>>>
>>>>==== debug mesg output ====
>>>>....
>>>>DEBUG
>>>
>>>org.apache.commons.beanutils.ConvertUtils.... 
>>>
>>>>DEBUG org.apache.commons.digester.Digester....
>>>>....
>>>>
>>>>__________________________________
>>>>Do you Yahoo!?
>>>>Free Pop-Up Blocker - Get it now
>>>>http://companion.yahoo.com/
>>>>
>>>>
>>>
> ---------------------------------------------------------------------
> 
>>>>To unsubscribe, e-mail:
>>>
>>>struts-user-unsubscribe@jakarta.apache.org
>>>
>>>>For additional commands, e-mail:
>>>
>>>struts-user-help@jakarta.apache.org
>>>
>>>
> ---------------------------------------------------------------------
> 
>>>To unsubscribe, e-mail:
>>>struts-user-unsubscribe@jakarta.apache.org
>>>For additional commands, e-mail:
>>>struts-user-help@jakarta.apache.org
>>>
>>
>>
>>__________________________________
>>Do you Yahoo!?
>>Free Pop-Up Blocker - Get it now
>>http://companion.yahoo.com/
>>
>>
> 
> ---------------------------------------------------------------------
> 
>>To unsubscribe, e-mail:
>>struts-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail:
>>struts-user-help@jakarta.apache.org
>>
> 
> 
> 
> __________________________________
> Do you Yahoo!?
> Free Pop-Up Blocker - Get it now
> http://companion.yahoo.com/
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
> 


-- 
Thanks
Manish Singla
x73166


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


Re: struts printing debug mesg regardless what I did

Posted by Kevin Hagel <kh...@mminternet.com>.
Is your log4j.properties being loaded?
Log4jConfigurer.initLogging("C:/somedir/src/test/log4j.properties");

----- Original Message ----- 
From: "david chan" <da...@yahoo.com>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Wednesday, December 03, 2003 10:00 AM
Subject: Re: struts printing debug mesg regardless what I did


> Tried both, not working.
> 
> David
> 
> --- Richard Yee <ry...@yahoo.com> wrote:
> > David,
> > Set
> >     <init-param>
> >       <param-name>debug</param-name>
> >       <param-value>0</param-value>
> >     </init-param>
> > 
> > in the web.xml for your action servlet.
> > 
> > -Richard
> > 
> > --- Kevin Hagel <kh...@mminternet.com> wrote:
> > > log4j.category.org.apache.common=WARN
> > > 
> > > ----- Original Message ----- 
> > > From: "david chan" <da...@yahoo.com>
> > > To: "Struts Users Mailing List"
> > > <st...@jakarta.apache.org>
> > > Sent: Wednesday, December 03, 2003 9:39 AM
> > > Subject: struts printing debug mesg regardless
> > what
> > > I did
> > > 
> > > 
> > > > Hi,
> > > >  I am using Struts 1.1 and log4j 1.2.4, and in
> > my
> > > > log4j.properties, I have this to turn off Struts
> > > debug
> > > > mesg, but it always printing debug mesg for
> > > package
> > > > org.apache.common. How can I turn it off?
> > > > Thanks.
> > > > David
> > > > 
> > > > ===my log config ===
> > > > log4j.rootLogger=warn, rolling
> > > > log4j.category.org.apache=warn, rolling
> > > >
> > >
> >
> log4j.appender.rolling=org.apache.log4j.RollingFileAppender
> > > > 
> > > > log4j.appender.rolling.File=c:\\temp\\temp.log
> > > > 
> > > > log4j.appender.rolling.MaxFileSize=5000KB
> > > > log4j.appender.rolling.MaxBackupIndex=5
> > > > 
> > > >
> > >
> >
> log4j.appender.rolling.layout=org.apache.log4j.PatternLayout
> > > >
> > log4j.appender.rolling.layout.ConversionPattern=%d
> > > %5p
> > > > [%t] %c{2} - %m%n
> > > > ====== end log config ====
> > > > 
> > > > 
> > > > ==== debug mesg output ====
> > > > ....
> > > > DEBUG
> > > org.apache.commons.beanutils.ConvertUtils.... 
> > > > DEBUG org.apache.commons.digester.Digester....
> > > > ....
> > > > 
> > > > __________________________________
> > > > Do you Yahoo!?
> > > > Free Pop-Up Blocker - Get it now
> > > > http://companion.yahoo.com/
> > > > 
> > > >
> > >
> >
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail:
> > > struts-user-unsubscribe@jakarta.apache.org
> > > > For additional commands, e-mail:
> > > struts-user-help@jakarta.apache.org
> > > > 
> > > 
> > >
> >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > > struts-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail:
> > > struts-user-help@jakarta.apache.org
> > > 
> > 
> > 
> > __________________________________
> > Do you Yahoo!?
> > Free Pop-Up Blocker - Get it now
> > http://companion.yahoo.com/
> > 
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > struts-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> > struts-user-help@jakarta.apache.org
> > 
> 
> 
> __________________________________
> Do you Yahoo!?
> Free Pop-Up Blocker - Get it now
> http://companion.yahoo.com/
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
> 

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


Re: struts printing debug mesg regardless what I did

Posted by david chan <da...@yahoo.com>.
Tried both, not working.

David

--- Richard Yee <ry...@yahoo.com> wrote:
> David,
> Set
>     <init-param>
>       <param-name>debug</param-name>
>       <param-value>0</param-value>
>     </init-param>
> 
> in the web.xml for your action servlet.
> 
> -Richard
> 
> --- Kevin Hagel <kh...@mminternet.com> wrote:
> > log4j.category.org.apache.common=WARN
> > 
> > ----- Original Message ----- 
> > From: "david chan" <da...@yahoo.com>
> > To: "Struts Users Mailing List"
> > <st...@jakarta.apache.org>
> > Sent: Wednesday, December 03, 2003 9:39 AM
> > Subject: struts printing debug mesg regardless
> what
> > I did
> > 
> > 
> > > Hi,
> > >  I am using Struts 1.1 and log4j 1.2.4, and in
> my
> > > log4j.properties, I have this to turn off Struts
> > debug
> > > mesg, but it always printing debug mesg for
> > package
> > > org.apache.common. How can I turn it off?
> > > Thanks.
> > > David
> > > 
> > > ===my log config ===
> > > log4j.rootLogger=warn, rolling
> > > log4j.category.org.apache=warn, rolling
> > >
> >
>
log4j.appender.rolling=org.apache.log4j.RollingFileAppender
> > > 
> > > log4j.appender.rolling.File=c:\\temp\\temp.log
> > > 
> > > log4j.appender.rolling.MaxFileSize=5000KB
> > > log4j.appender.rolling.MaxBackupIndex=5
> > > 
> > >
> >
>
log4j.appender.rolling.layout=org.apache.log4j.PatternLayout
> > >
> log4j.appender.rolling.layout.ConversionPattern=%d
> > %5p
> > > [%t] %c{2} - %m%n
> > > ====== end log config ====
> > > 
> > > 
> > > ==== debug mesg output ====
> > > ....
> > > DEBUG
> > org.apache.commons.beanutils.ConvertUtils.... 
> > > DEBUG org.apache.commons.digester.Digester....
> > > ....
> > > 
> > > __________________________________
> > > Do you Yahoo!?
> > > Free Pop-Up Blocker - Get it now
> > > http://companion.yahoo.com/
> > > 
> > >
> >
>
---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > struts-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail:
> > struts-user-help@jakarta.apache.org
> > > 
> > 
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > struts-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> > struts-user-help@jakarta.apache.org
> > 
> 
> 
> __________________________________
> Do you Yahoo!?
> Free Pop-Up Blocker - Get it now
> http://companion.yahoo.com/
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> struts-user-help@jakarta.apache.org
> 


__________________________________
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/

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


Re: struts printing debug mesg regardless what I did

Posted by Richard Yee <ry...@yahoo.com>.
David,
Set
    <init-param>
      <param-name>debug</param-name>
      <param-value>0</param-value>
    </init-param>

in the web.xml for your action servlet.

-Richard

--- Kevin Hagel <kh...@mminternet.com> wrote:
> log4j.category.org.apache.common=WARN
> 
> ----- Original Message ----- 
> From: "david chan" <da...@yahoo.com>
> To: "Struts Users Mailing List"
> <st...@jakarta.apache.org>
> Sent: Wednesday, December 03, 2003 9:39 AM
> Subject: struts printing debug mesg regardless what
> I did
> 
> 
> > Hi,
> >  I am using Struts 1.1 and log4j 1.2.4, and in my
> > log4j.properties, I have this to turn off Struts
> debug
> > mesg, but it always printing debug mesg for
> package
> > org.apache.common. How can I turn it off?
> > Thanks.
> > David
> > 
> > ===my log config ===
> > log4j.rootLogger=warn, rolling
> > log4j.category.org.apache=warn, rolling
> >
>
log4j.appender.rolling=org.apache.log4j.RollingFileAppender
> > 
> > log4j.appender.rolling.File=c:\\temp\\temp.log
> > 
> > log4j.appender.rolling.MaxFileSize=5000KB
> > log4j.appender.rolling.MaxBackupIndex=5
> > 
> >
>
log4j.appender.rolling.layout=org.apache.log4j.PatternLayout
> > log4j.appender.rolling.layout.ConversionPattern=%d
> %5p
> > [%t] %c{2} - %m%n
> > ====== end log config ====
> > 
> > 
> > ==== debug mesg output ====
> > ....
> > DEBUG
> org.apache.commons.beanutils.ConvertUtils.... 
> > DEBUG org.apache.commons.digester.Digester....
> > ....
> > 
> > __________________________________
> > Do you Yahoo!?
> > Free Pop-Up Blocker - Get it now
> > http://companion.yahoo.com/
> > 
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> struts-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> struts-user-help@jakarta.apache.org
> > 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> struts-user-help@jakarta.apache.org
> 


__________________________________
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/

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


Re: struts printing debug mesg regardless what I did

Posted by Kevin Hagel <kh...@mminternet.com>.
log4j.category.org.apache.common=WARN

----- Original Message ----- 
From: "david chan" <da...@yahoo.com>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Wednesday, December 03, 2003 9:39 AM
Subject: struts printing debug mesg regardless what I did


> Hi,
>  I am using Struts 1.1 and log4j 1.2.4, and in my
> log4j.properties, I have this to turn off Struts debug
> mesg, but it always printing debug mesg for package
> org.apache.common. How can I turn it off?
> Thanks.
> David
> 
> ===my log config ===
> log4j.rootLogger=warn, rolling
> log4j.category.org.apache=warn, rolling
> log4j.appender.rolling=org.apache.log4j.RollingFileAppender
> 
> log4j.appender.rolling.File=c:\\temp\\temp.log
> 
> log4j.appender.rolling.MaxFileSize=5000KB
> log4j.appender.rolling.MaxBackupIndex=5
> 
> log4j.appender.rolling.layout=org.apache.log4j.PatternLayout
> log4j.appender.rolling.layout.ConversionPattern=%d %5p
> [%t] %c{2} - %m%n
> ====== end log config ====
> 
> 
> ==== debug mesg output ====
> ....
> DEBUG org.apache.commons.beanutils.ConvertUtils.... 
> DEBUG org.apache.commons.digester.Digester....
> ....
> 
> __________________________________
> Do you Yahoo!?
> Free Pop-Up Blocker - Get it now
> http://companion.yahoo.com/
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
> 

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


struts printing debug mesg regardless what I did

Posted by david chan <da...@yahoo.com>.
Hi,
 I am using Struts 1.1 and log4j 1.2.4, and in my
log4j.properties, I have this to turn off Struts debug
mesg, but it always printing debug mesg for package
org.apache.common. How can I turn it off?
Thanks.
David

===my log config ===
log4j.rootLogger=warn, rolling
log4j.category.org.apache=warn, rolling
log4j.appender.rolling=org.apache.log4j.RollingFileAppender

log4j.appender.rolling.File=c:\\temp\\temp.log

log4j.appender.rolling.MaxFileSize=5000KB
log4j.appender.rolling.MaxBackupIndex=5

log4j.appender.rolling.layout=org.apache.log4j.PatternLayout
log4j.appender.rolling.layout.ConversionPattern=%d %5p
[%t] %c{2} - %m%n
====== end log config ====


==== debug mesg output ====
....
DEBUG org.apache.commons.beanutils.ConvertUtils.... 
DEBUG org.apache.commons.digester.Digester....
....

__________________________________
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/

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