== ServletContextListener and InitParameters question ==
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   joey_corleon
Posted On:   Tuesday, February 18, 2003 11:53 AM

Hi, In my listener (derivated from ServletContextListener) I was expecting to be able to be able to lookup the InitParameters that I have configured in my web.xml as follow: log4j-init-file /WEB-INF/config/log4j-config It is however not the case - in the contextInitialized method I have tried: Enumeration en = evt.getServletContext().getInitParameterNames(); while( en.hasMoreElements() ) { System.out.println( "-> " + (String)en.nextElement() ); } and it turns out that it does not return any of the init parmas of my web.xml file :-( Can anyone explain?    More>>

Hi,


In my listener (derivated from ServletContextListener) I was expecting to be able to be able to lookup the InitParameters that I have configured in my web.xml as follow:





log4j-init-file

/WEB-INF/config/log4j-config





It is however not the case - in the contextInitialized method I have tried:


Enumeration en = evt.getServletContext().getInitParameterNames();

while( en.hasMoreElements() ) {

System.out.println( "-> " + (String)en.nextElement() );

}


and it turns out that it does not return any of the init parmas of my web.xml file :-(


Can anyone explain?


Thanks!

   <<Less

Re: == ServletContextListener and InitParameters question ==

Posted By:   vinay_salehithal  
Posted On:   Tuesday, February 18, 2003 01:44 PM

Context initialization parameters are defined as follows:



name

vinay


About | Sitemap | Contact