dcsimg
Tomcat won't start after adding code for Context Initialized
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Tuesday, September 23, 2003 06:00 AM

Hello. I'm trying to start a Java class file running once the Tomcat context is started. I added listener tags in web.xml: com.myarea.myapplicationname.myContextListener MyContextListerner Java code is: import javax.servlet.*; public final class myContextListener implements ServletContextListener { public void contextInitialized(ServletContextEvent event) { } public void contextDestroyed(ServletContextEvent event) { } } The contextInitialized does nothing, yet when I try to restart Tomcat to reflect the web.xml ch   More>>

Hello. I'm trying to start a Java class file running once the Tomcat context is started. I added listener tags in web.xml:









com.myarea.myapplicationname.myContextListener






MyContextListerner Java code is:




import javax.servlet.*;


public final class myContextListener implements ServletContextListener {

public void contextInitialized(ServletContextEvent event) {



}


public void contextDestroyed(ServletContextEvent event) {


}

}



The contextInitialized does nothing, yet when I try to restart Tomcat to reflect the web.xml change, Tomcat stops running and will not restart. Do you have any ideas on why Tomcat would not start?


Your help is greatly appreciated!

Thank you.

Tiffany

   <<Less

Re: Tomcat won't start after adding code for Context Initialized

Posted By:   Anonymous  
Posted On:   Tuesday, September 23, 2003 07:12 PM

In case you were interested:



You wouldn't have known it from the code above, but the dtd was too old. Changed from version 2.2 to 2.3 and it works!


Cheers.

About | Sitemap | Contact