NetBeans 6.8 Output window:

In-place deployment at C:\NetBeans_Projects\webappname\build\web
Cannot deploy the module. The context.xml file seems to be broken. Check 
whether it is well-formed and valid.
C:\NetBeans_Projects\webappname\nbproject\build-impl.xml:584: The module has 
not been deployed.



-----Original Message-----
From: Leo Donahue - PLANDEVX [mailto:leodona...@mail.maricopa.gov] 
Sent: Monday, May 10, 2010 2:51 PM
To: 'Tomcat Users List'
Subject: RE: Context in conf/Catalina/localhost question

NetBeans 6.8 won't even run the webapp within the IDE unless the path attribute 
is set in META-INF/context.xml  I understand why the IDE needs the path to run 
the webapp from the the NetBeans work directory, but do the NetBeans people 
talk to the Tomcat people? :)

Maybe, the clean and build tool in NetBeans could strip that out when it 
creates the war file?  I'm just saying.  People forget.


-----Original Message-----
From: Leo Donahue - PLANDEVX [mailto:leodona...@mail.maricopa.gov]
Sent: Sunday, May 09, 2010 6:27 PM
To: 'Tomcat Users List'
Subject: RE: Context in conf/Catalina/localhost question

This always happens.  Once I send a question I find the answer.  Normally I've 
been copying expanded webapp directories to the webapps folder when I have 
Tomcat stopped for other server maintenance.  I forgot that I experimented with 
deploying a war file for the apnxy servlet.  I'm going to point the finger at 
NetBeans for adding the path attribute to my context.  Tomcat was just doing 
what it is supposed to under automatic deployment:  
http://tomcat.apache.org/tomcat-6.0-doc/config/host.html#Automatic%20Application%20Deployment



-----Original Message-----
From: Leo Donahue - PLANDEVX [mailto:leodona...@mail.maricopa.gov]
Sent: Sunday, May 09, 2010 6:17 PM
To: 'Tomcat Users List'
Subject: Context in conf/Catalina/localhost question

I've noticed that sometimes when I make a change to an existing webapp or 
deploy a new one, that the file contents created in conf/Catalina/localhost do 
not match the contents of the context file in META-INF/context.xml of the 
webapp dir.

Tomcat 6.0.24 - still. Upgrade is coming.

Example, I added a valve to each of my webapps context.xml to turn on the 
access logs.  The valve was the same for each webap, I only changed the name of 
the access log file name.  Three of four webapps produced a log file, but one 
webapp would not produce an access log file, no matter how many times I 
restarted Tomcat - deleted the cache in the work directory and removed previous 
entries in conf/Catalina/localhost.

http://tomcat.apache.org/tomcat-6.0-doc/config/context.html
"... You may define as many Context elements as you wish. Each such Context 
MUST have a unique context path. In addition, a Context must be present with a 
context path equal to a zero-length string. This Context becomes the default 
web application for this virtual host, and is used to process all requests that 
do not match any other Context's context path ..."


Contents of the apnxy servlet META-INF/context.xml that keep appearing in 
conf/Catalina/localhost, and I didn't even have the path attribute set in that 
file:
<?xml version="1.0" encoding="UTF-8"?>
<Context antiJARLocking="true" path="/apnxy"> </Context>


I finally just stopped Tomcat, deleted the cache in work dir, renamed and 
manually copied the apnxy.xml file from META-INF/context.xml to 
conf/Catalina/localhost and started Tomcat.  Access log for apnxy_... appeared. 
 What did I miss?


Contents of each access log valve:

<?xml version="1.0" encoding="UTF-8"?>
<Context antiJARLocking="true">
        <!-- Log all requests to Tomcat root -->
        <Valve className="org.apache.catalina.valves.AccessLogValve" 
directory="logs"
        prefix="apnxy_access_log." suffix=".txt" pattern="common" 
resolveHosts="false"/> </Context>



Contents of context.xml in conf directory:

<?xml version='1.0' encoding='utf-8'?>
<!-- The contents of this file will be loaded for each web application --> 
<Context>

    <!-- Default set of monitored resources -->
    <WatchedResource>WEB-INF/web.xml</WatchedResource>

    <!-- Uncomment this to disable session persistence across Tomcat restarts 
-->
    <!--
    <Manager pathname="" />
    -->

    <!-- Uncomment this to enable Comet connection tacking (provides events
         on session expiration as well as webapp lifecycle) -->
    <!--
    <Valve className="org.apache.catalina.valves.CometConnectionManagerValve" />
    -->

</Context>

Leo



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to