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 load html from Tomcat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Can�t load html from Tomcat" Watch "Can�t load html from Tomcat" New topic

Can�t load html from Tomcat

Eric Daks

Joined: May 16, 2006
Posts: 1
Hello, I�ve been studying this book about Tomcat. It asks me to change the appBase attribute of the <Host> tag in server.xml from webapps (the default) to a different folder so that my development is detached from Tomcat. So now the <Host> tag looks like this:

<Host name="localhost" debug="0" appBase="c:/_home/deploy/apps"
unpackWARs="true" autoDeploy="false">

Besides the change in server.xml, the book also asks me to create a separate context XML descriptor file and put it in CATALINA_HOME/conf/Catalina/localhost. The descriptor file looks like this:

<Context path=�/unleashed� docBase=�unleashed� debug=�0�>
<Logger className=�org.apache.catalina.logger.FileLogger�
prefix=�localhost_unleashed_� suffix=�.log�

Besides that, admin.xml and manager.xml of %CATALINA_HOME%\conf\Catalina\localhost were also changed respectively to:

<Context path=�/admin� docBase=�c:/_home/apps/tomcat5/server/webapps/admin�
debug=�0� privileged=�true�>
<Logger className=�org.apache.catalina.logger.FileLogger�
prefix=�localhost_admin_log.� suffix=�.txt�

<Context path=�/manager� docBase=�c:/_home/apps/tomcat5/server/webapps/manager�
debug=�0� privileged=�true�>
<ResourceLink name=�users� global=�UserDatabase�

With this kind of setup, I don�t have to put the JSPs and everything in CATALINA_HOME\webapps\unleashed folder

Everything seems to be going OK � I�ve been able to test my JSPs. But the problem came up when it�s time to test html: I couldn�t open a simple html file. Even the Tomcat�s homepage wouldn�t be loaded.

I tried a little experiment. I changed back the appBase attribute to webapps once again and I now I can see the Tomcat�s homepage but of course I cannot run my JSPs on the book.

Can somebody tell me what to do? Thanks in advance
Ben Souther

Joined: Dec 11, 2004
Posts: 13410

You might want to list the name of the book and which version of Tomcat you're using.

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
I agree. Here's the link:
subject: Can�t load html from Tomcat
jQuery in Action, 3rd edition