Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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).

share|improve this question
    
What does <Host> element in server.xml look like? Did you take a look at catalina.out? –  quanta Oct 14 '11 at 3: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. –  JVerstry 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. –  JVerstry Oct 14 '11 at 19:23

1 Answer 1

up vote 1 down vote accepted

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.

share|improve this answer
1  
Woaw, it works. I would have never found it by myself... Thanks !!! –  JVerstry Oct 21 '11 at 19:04

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.