File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Tomcat and the fly likes can't access tomcat-docs webapp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "can Watch "can New topic

can't access tomcat-docs webapp

andy gibb

Joined: Nov 23, 2011
Posts: 3
I am using Tomcat 4 in Linux. Yes , I know this is an old version but this is company software and I have to work with what's there.

I was under the impression these built-in webapps should work as-is by typing a URL http://myhost:8080/tomcat-docs/index.html.

But it doesn't work.

I have checked to make sure the index.html file exists.
I have checked the server.xml file and the context is defined for tomcat-docs.
I have checked to make sure there is a web.xml file under WEB-INF in the tomcat-docs/ directory.
I have restarted Tomcat multiple times.

I can only access files under the ROOT directory. I can add new *.html and *.jsp files in ROOT and access them, but I can't access any other webapps.
I tried creating other webapps (with the appropriate context definitions in server.xml and the appropriate directory structures) but I couldn't access them either.

Just for fun I actually deleted the server.xml file out of the conf/ directory, and Tomcat still ran fine, and I was able to access the ROOT/ directory files.
It seems like Tomcat is not reading the server.xml file at all.

Any suggestions? (would be much appreciated)
Rob Spoor

Joined: Oct 27, 2005
Posts: 19655

What do the localhost.<date>.log files say?

How To Ask Questions How To Answer Questions
andy gibb

Joined: Nov 23, 2011
Posts: 3
Are those files supposed to be in the logs/ directory under the CATALINA home directory? Because that logs directory is empty. I thought it looked like the logging was enabled in the server.xml file, but maybe I'm missing some *.jar files ....

ughh It would so totally be easier just to re-install a new version of Tomcat from scratch because I don't know how these guys installed it... but I'm stuck with this.

But is there anything obvious in the configuration that I missed for enabling webapps?
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 12761
Is it possible that the web.xml for tomcat-docs got edited or damaged so that Tomcat does not recognize the application?

Resurrecting my Tomcat 4.1.30 I see that server.xml does not say anything about a tomcat-docs context - perhaps yours got modified?


andy gibb

Joined: Nov 23, 2011
Posts: 3
Yes the web.xml is there for tomcat-docs... and it is possible it is damaged in some way. But none of the other webapps would work either - the 'examples' webapp does not come up, and the manager webapp does not come up.

Actually - I'm not entirely sure that Tomcat is running as a standalone webserver - It might just be running as an attachment to Apache. If this were true, then none of the config changes I make to server.xml would have any effect, right?
Rob Spoor

Joined: Oct 27, 2005
Posts: 19655

Unless you've removed the connector for it, Tomcat will still be able to run as standalone, on a different port than Apache.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15961

Update your résumé. Tomcat4 passed End of Life years ago. You'll get no official support for it. We can help you, but a company that thinks "If it ain't broke, don't fix it" applies to IT isn't a safe place to work. In theory, software works forever, but in reality, the environments change so much over time that if stuff isn't maintained periodically, the day eventually comes when catastrophe occurs. And these days, that's usually after they laid off the last person who knew what was going on (not that that takes very long).

I saw a "doesn't work" message, but I didn't see specifically how it doesn't work (though I miss things often). So I can't even venture a guess. Tomcat is not embedded in Apache HTTPD, however, so rule that out. On the other hand, if you're running Tomcat under the never-to-be-sufficiently-curse Eclipse WTP, that mongrel system DOES ignore your server.xml - it clones it and a few select files (but not enough of them), puts them in a private location and uses the cloned copies.

So what does "doesn't work mean?" 404? 503? Client hangs? Tomcat abnormally terminates???

Customer surveys are for companies who didn't pay proper attention to begin with.
I agree. Here's the link:
subject: can't access tomcat-docs webapp
Similar Threads
Configuring webapp to use subdirectories
Tomcat 5.5 manual deployment
Configuration questions for Tomcat
Tomcat 5.0.27 Connection Pooling
html vs servlet