2

As part of re-installing NetBeans 7.0.1, I had Tomcat 7.0.14 installed too on my PC. I created a manager role too. I can access http://localhost:8084/manager/html successfully.

<role rolename="manager-gui" />
<user username="tomcat" password="tomcat" roles="manager-gui"/> 

However, when I try to access documentation, like http://localhost:8084/docs/setup.html, I get a HTTP 404 resource not available. I checked in the installation directory and /webapps/docs/setup.html does exist.

What am I doing wrong? What am I missing? Thanks.

EDIT

Here is the Host content of server.xml:

  <Host name="localhost"  appBase="webapps"
        unpackWARs="true" autoDeploy="true">

    <!-- SingleSignOn valve, share authentication between web applications
         Documentation at: /docs/config/valve.html -->
    <!--
    <Valve className="org.apache.catalina.authenticator.SingleSignOn" />
    -->

    <!-- Access log processes all example.
         Documentation at: /docs/config/valve.html
         Note: The pattern used is equivalent to using pattern="common" -->
    <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"  
           prefix="localhost_access_log." suffix=".txt"
           pattern="%h %l %u %t &quot;%r&quot; %s %b" resolveHosts="false"/>

  </Host>

I could not find any catalina.out files in the log directory (or elsewhere).

Jérôme Verstrynge
  • 4,747
  • 7
  • 23
  • 34
  • What does `` element in `server.xml` look like? Did you take a look at `catalina.out`? – quanta Oct 14 '11 at 03:56
  • @quanta Sorry for the late reply, I had to perform a couple of tests to double-check my installation, but the issue still remains. I have edited my question with info. – Jérôme Verstrynge Oct 14 '11 at 17:35
  • `catalina.out` file is located at `$TOMCAT_HOME/logs`, e.g: `/usr/share/tomcat6/logs/`. – quanta Oct 14 '11 at 18:29
  • @quanta Yes, I know, I checked my /logs directory and it is empty. I re-installed NetBeans 7.0.1 including Tomcat from scratch and it is still empty. – Jérôme Verstrynge Oct 14 '11 at 19:23

1 Answers1

1

Check the value of the CATALINA_BASE environment variable. It's in the top of the Apache Tomcat Output window in NetBeans:

Using CATALINA_HOME: /opt/apache-tomcat-7.0.14
Using CATALINA_BASE: /home/user/.netbeans/7.0/apache-tomcat-7.0.14.0_base

The value of CATALINA_BASE is different than CATALINA_HOME. CATALINA_HOME is where Tomcat's binaries are and settings are in CATALINA_BASE. Tomcat runs those webapps which have a config in this (CATALINE_BASE) directory. The exact place is (in my case) /home/user/.netbeans/7.0/apache-tomcat-7.0.14.0_base/conf/Catalina/localhost.

Just put a docs.xml to the /home/user/.netbeans/7.0/apache-tomcat-7.0.14.0_base/conf/Catalina/localhost folder with the following:

<Context docBase="${catalina.home}/webapps/docs" />

Then restart Tomcat.

palacsint
  • 477
  • 3
  • 9