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

> From: Riaz, Bob [mailto:[EMAIL PROTECTED]
> 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
initialization.
>>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


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
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: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to