The error your getting is more likely saying that you computer can not
resolve localhost as domain name. If so it would have nothing to do
with your server config. Try using the loop back IP(127.0.0.1). If
this is happening on a windows box you may want to run a check for
viruses or spyware. If it is Linux make sure you have a listing for
localhost in your /etc/hosts file.
Brian Moseley wrote:
i'm using tomcat 5.5.9 with a single webapp deployed with a context path
of "" and a default host named "localhost". when i request the webapp's
root resource (http://localhost:8080/), i get a 400 error with the
message "No Host matches server name localhost".
as you can see from my very minimal server.xml, i do in fact have a Host
named localhost and have specified it as the default host for the
engine. so, i must admit to being confused as to why i'm receiving that
particular error message. :) i have turned on debug logging to verify
that the context is being loaded, but i have yet to step through a
request with a debugger. any ideas?
server.xml:
<Server port="8005" shutdown="SHUTDOWN">
<Service name="Catalina">
<Connector port="8080" enableLookups="false"/>
<Engine name="Catalina" defaultHost="localhost">
<Host name="localhost" appBase="webapps" autoDeploy="false"/>
</Engine>
</Service>
</Server>
context.xml (in conf/Catalina/localhost/):
<Context path="" docBase="cosmo" reloadable="true">
<Environment name="cosmo/version" value="0.2-4"
type="java.lang.String" override="false"/>
<Environment name="cosmo/serverAdmin" value="[EMAIL PROTECTED]"
type="java.lang.String" override="false"/>
<Environment name="cosmo/repository/username"
value="cosmo_repository"
type="java.lang.String" override="false"/>
<Environment name="cosmo/repository/password"
value=""
type="java.lang.String" override="false"/>
<Resource name="jcr/cosmo"
type="javax.jcr.Repository"
factory="org.apache.jackrabbit.core.jndi.BindableRepositoryFactory"
configFilePath="etc/repository.xml"
repHomeDir="data/repository"/>
<Resource name="jdbc/cosmo"
type="javax.sql.DataSource"
maxActive="5"
maxIdle="3"
maxWait="10000"
username="sa"
parameter=""
driverClassName="org.hsqldb.jdbcDriver"
url="jdbc:hsqldb:file:data/db/userdb"/>
<Resource name="mail/cosmo"
type="javax.mail.Session"
mail.transport.protocol="smtp"/>
mail.smtp.host="localhost"/>
mail.smtps.host="localhost"/>
mail.smtp.starttls.enable="false"/>
<Valve className="org.apache.catalina.valves.AccessLogValve"
directory="../logs" prefix="access." suffix=".log"
pattern="combined" resolveHosts="false"/>
</Context>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Brian Cook
Digital Services Analyst
Print Time Inc.
[EMAIL PROTECTED]
913.345.8900
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]