Tomcat 5.0.28 and HTTP 400 errors

Z

Zouplaz

Hello, I'm trying to reconfigure a test project (I used it to learn java -
it's a blog system based on Velocity + Hibernate) that I've left for few
months.

I've spent 2 days trying to understand why I only get HTTP 400 error ("no
host matches this name") when I try to access the site.
Localhost (tomcat admin and manager) run fine...
So, I've disabled this site in my server.xml file and set up a blank new
project - But I'm still getting same errors.


Versions are Tomcat 5.0.28 running on Windows XP Pro SP2 - JDK jdk1.5.0_04
(but same problem occurs on Linux with jdk 1.4.2-06)


Here are the relevant parts of the config files :

server.xml

<Engine defaultHost="localhost" name="Catalina">
<Host appBase="jblog" name="devjblog.dev.mydomain.com">
</Host>
<Host appBase="webapps" name="localhost">
</Host>
</Engine>

CATALINA_HOME/Catalina/devjblog.dev.mydomain.com/ROOT.xml

<Context displayName="MyJBlogger" docBase="D:\JavaDev\eclipse_projects
\AnaemJBlog" path="" reloadable="true" workDir="work\Catalina\jblog\_">


Based on some messages, it seems that the problem is not related with the
name of the host but with something wrong in the Context. But I don't know
why.

And, just to finish : some logs are never created - For example, adding to
the localhost host

<Logger className="org.apache.catalina.logger.FileLogger"
prefix="localhost_log." suffix=".txt" timestamp="true"/>

works fine, but adding this line to the Engine
<Logger className="org.apache.catalina.logger.FileLogger"
prefix="catalina_log." suffix=".txt" timestamp="true"/>

Don't



I'm really stuck, any help will be greatly appreciated ! Thanks
 
Z

Zouplaz

server.xml

<Engine defaultHost="localhost" name="Catalina">
<Host appBase="jblog" name="devjblog.dev.mydomain.com">
</Host>
<Host appBase="webapps" name="localhost">
</Host>
</Engine>

Found it : appBase is wrong and should be set to the the absolute path.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,153
Members
46,701
Latest member
XavierQ83

Latest Threads

Top