Edoardo Panfili wrote:
Il 19/10/13 00:24, Mark Eggers ha scritto:
On 10/18/2013 3:18 PM, André Warnier wrote:
Edoardo Panfili wrote:
Il 17/10/13 18:45, Edoardo Panfili ha scritto:
My Tomcat (7.0.42) is listening on port 7080 and I have this
conf/tomcat-users.xml in (production server)

-------
<tomcat-users>
<role rolename="manager-script"/>
  <user username="myname" password="pwd"
roles="manager-script,manager-gui,manager-jmx"/>
</tomcat-users>
----------
if I use

curl -u myname:pwd
http://localhost:7080/manager/text/reload?path=/myApplication

the response is--------------------------
    <h1>404 Not found</h1>
    <p>
     The page you tried to access
     (/manager/text/reload)
     does not exist.
    </p>
    <p>
     The Manager application has been re-structured for Tomcat 7
onwards
and some
     of URLs have changed. All URLs used to access the Manager
application should
     now start with one of the following options:
    </p>
     <ul>
       <li>/manager/html for the HTML GUI</li>
       <li>/manager/text for the text interface</li>
       <li>/manager/jmxproxy for the JMX proxy</li>
       <li>/manager/status for the status pages</li>
     </ul>
    <p>
     Note that the URL for the text interface has changed from
     &quot;/manager&quot; to
     &quot;/manager/text&quot;.
    </p>
    <p>
     You probably need to adjust the URL you are using to access the
Manager
     application. However, there is always a chance you have found a
bug
in the
     Manager application. If you are sure you have found a bug, and
that
the bug
     has not already been reported, please report it to the Apache
Tomcat team.
    </p>
---------------------------------------------------------


Installation step by step:

Unpack new download from tomcat.apache.org

1- set users
<tomcat-users>
  <user username="edoardo" password="pwd"
    roles="manager-script,manager-gui,manager-jmx,other"/>
</tomcat-users>

then reload tomcat
$curl -u edoardo:pwd
http://localhost:8080/manager/text/reload?path=/examples
OK - Reloaded application at context path /examples


2- copy myApplication from production server
copy configuration file ($tomcat/Catalina/localhost/myApplication.xml)
from production server
stop & start tomcat

$curl -u edoardo:pwd
http://localhost:8080/manager/text/reload?path=/myApplication
OK - Reloaded application at context path /myApplication


3- first modify to server.xml
shutdown tomcat
modify server.xml
<Connector port="8080" protocol="HTTP/1.1"
becomes
<Connector port="9080" protocol="HTTP/1.1"

start then curl again
all well


4- second modify to server.xml
<Host name="localhost"  appBase="webapps"
unpackWARs="true" autoDeploy="true">
becomes
<Host name="localhost"  appBase="webapps"
unpackWARs="true" autoDeploy="true" deployXML="false">

stop-start

$curl -u edoardo:pwd
http://localhost:9080/manager/text/reload?path=/myApplication
javax.servlet.ServletException: Error instantiating servlet class
org.apache.catalina.manager.ManagerServlet
[...]

$curl -u edoardo:pwd
http://localhost:9080/manager/text/reload?path=/myApplication
the same error reported in the initial post (above)



deployXML="false" is recommended at
http://tomcat.apache.org/tomcat-7.0-doc/config/host.html and useful
for me.

One big difference that I see when deployXML="false", is that this file :
(catalina_base)/webapps/myApplication/META-INF/context.xml
is no longer being parsed,
and instead this file is parsed :
$tomcat/Catalina/localhost/myApplication.xml
when you reload your app.
What is the content of that file ?

 From the last log file that was posted, these context files are pretty
broken (although myApplication.xml only had the magic debug attribute set).

another try:

- remove deployXML="false" from server.xml
- cp $tomcat/conf/Catalina/localhost/myApplication.xml $tomcat/webapps/myApplication/META-INF/context.xml
- stop then start tomcat

$curl -u name:pwd http://localhost:9080/manager/text/reload?path=/myApplication
OK - Reloaded application at context path /myApplication


That does look like a bug, doesn't it ?
Or at least, it doesn't look like it matches what is written in http://tomcat.apache.org/tomcat-7.0-doc/config/host.html
for "deployXML".

What happens if you set autoDeploy="false" ?




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

Reply via email to