tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Riaz, Bob" <>
Subject RE: ContextListener executes twice
Date Tue, 22 Jul 2008 17:22:30 GMT

-----Original Message-----
From: Caldarale, Charles R [] 
Sent: Tuesday, July 22, 2008 11:52 AM
To: Tomcat Users List
Subject: RE: ContextListener executes twice

> From: Riaz, Bob []
> Subject: RE: ContextListener executes twice
> > 1) Where is your webapp deployed?
> On my dev machine - localhost. Is that what you mean?

No, what directory is it in?  Is it a .war or an expanded webapp?
>>\NetBeansProjects. Expanded webapp, not running it as a .war.

> > 2) Do you have a META-INF/context.xml file inside your webapp?
> <?xml version="1.0" encoding="UTF-8"?>
> <Context path="/MyWebApp"/>

The path attribute is illegal here.  You don't really need a <Context>
at all.
>>Ok. Removed it. But if the conf/Catalina/[host]/[appName].xml
overrides this, this should make no difference, right?

> > 3) Do you have a conf/Catalina/[host]/[appName].xml file?
> <?xml version="1.0" encoding="UTF-8"?>
> <Context
> docBase="C:/..Path/NetBeansProjects/MyWebApp/build/web" path="/
> MyWebApp "/>

The above will override the invalid one in META-INF/context.xml.

> > 4) What is the appBase setting for each of your <Host> elements
> > in conf/server.xml?
> <Host name="localhost"  appBase="webapps"

Do you happen to have a copy of your webapp deployed under Tomcat's
webapps directory?  If so, that would account for the double
>>Don't see it under \webapps

Does the problem occur when you run Tomcat independently of NetBeans, or
only if run through NetBeans?
>>So far I have only run it through NetBeans. When I try to start Tomcat
through the cmd shell (using startup.bat) I get the following error:
"The JAV_HOME environment variable is not defined correctly
This environment variable is needed to run this program
NB:JAVA_HOME should point to a JDK nota JRE"
The JAVA_HOME variable points to the bin in the jdk folder, same error
if JAVA_HOME points to jdk folder.

 - Chuck

MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message