问个问题:有关于在Linux下安装Tomcat,和win2000下安装同样的配置,却不行!帮忙看看! ( 积分: 50 )

  • 主题发起人 主题发起人 TrustMe
  • 开始时间 开始时间
T

TrustMe

Unregistered / Unconfirmed
GUEST, unregistred user!
本人在Linux7下安装有Tomcat5.5.14,配置文件server.xml内容如下:
<Server port=&quot;8005&quot;
shutdown=&quot;SHUTDOWN&quot;>
<Listener className=&quot;org.apache.catalina.core.AprLifecycleListener&quot;
/>
<Listener className=&quot;org.apache.catalina.mbeans.ServerLifecycleListener&quot;
/>
<Listener className=&quot;org.apache.catalina.mbeans.GlobalResourcesLifecycleListener&quot;
/>
<Listener className=&quot;org.apache.catalina.storeconfig.StoreConfigLifecycleListener&quot;/>
<GlobalNamingResources>
<Environment name=&quot;simpleValue&quot;
type=&quot;java.lang.Integer&quot;
value=&quot;30&quot;/>
<Resource name=&quot;UserDatabase&quot;
auth=&quot;Container&quot;
type=&quot;org.apache.catalina.UserDatabase&quot;
description=&quot;User database that can be updated and saved&quot;
factory=&quot;org.apache.catalina.users.MemoryUserDatabaseFactory&quot;
pathname=&quot;conf/tomcat-users.xml&quot;
/>
</GlobalNamingResources>
<Service name=&quot;Catalina&quot;>
<Connector
port=&quot;8080&quot;
maxHttpHeaderSize=&quot;8192&quot;
maxThreads=&quot;150&quot;
minSpareThreads=&quot;25&quot;
maxSpareThreads=&quot;75&quot;
enableLookups=&quot;false&quot;
redirectPort=&quot;8443&quot;
acceptCount=&quot;100&quot;
connectionTimeout=&quot;20000&quot;
disableUploadTimeout=&quot;true&quot;
/>
<Engine name=&quot;Catalina&quot;
defaultHost=&quot;localhost&quot;>
<Realm className=&quot;org.apache.catalina.realm.UserDatabaseRealm&quot;
resourceName=&quot;UserDatabase&quot;/>
<Host name=&quot;localhost&quot;
appBase=&quot;webapps&quot;
unpackWARs=&quot;true&quot;
autoDeploy=&quot;true&quot;
xmlValidation=&quot;false&quot;
xmlNamespaceAware=&quot;false&quot;>
<Context path=&quot;/dodo&quot;
docBase=&quot;/home/dodo/tomcat&quot;
debug=&quot;0&quot;
reloadable=&quot;true&quot;
crossContext=&quot;true&quot;>
</Context>
</Host>
</Engine>
</Service>
</Server>
此配置和在win2000下的配置的一样,win2000下的我已经试验成功,jsp和servlet都已经工作正常,可在Linux下出现如下的错误:
HTTP Status 404 - /
--------------------------------------------------------------------------------
type Status report
message /
description The requested resource (/) is not available.
--------------------------------------------------------------------------------
Apache Tomcat/5.5.14
哪位大侠有此方面的经验,还望不吝赐教!
 
本人在Linux7下安装有Tomcat5.5.14,配置文件server.xml内容如下:
<Server port=&quot;8005&quot;
shutdown=&quot;SHUTDOWN&quot;>
<Listener className=&quot;org.apache.catalina.core.AprLifecycleListener&quot;
/>
<Listener className=&quot;org.apache.catalina.mbeans.ServerLifecycleListener&quot;
/>
<Listener className=&quot;org.apache.catalina.mbeans.GlobalResourcesLifecycleListener&quot;
/>
<Listener className=&quot;org.apache.catalina.storeconfig.StoreConfigLifecycleListener&quot;/>
<GlobalNamingResources>
<Environment name=&quot;simpleValue&quot;
type=&quot;java.lang.Integer&quot;
value=&quot;30&quot;/>
<Resource name=&quot;UserDatabase&quot;
auth=&quot;Container&quot;
type=&quot;org.apache.catalina.UserDatabase&quot;
description=&quot;User database that can be updated and saved&quot;
factory=&quot;org.apache.catalina.users.MemoryUserDatabaseFactory&quot;
pathname=&quot;conf/tomcat-users.xml&quot;
/>
</GlobalNamingResources>
<Service name=&quot;Catalina&quot;>
<Connector
port=&quot;8080&quot;
maxHttpHeaderSize=&quot;8192&quot;
maxThreads=&quot;150&quot;
minSpareThreads=&quot;25&quot;
maxSpareThreads=&quot;75&quot;
enableLookups=&quot;false&quot;
redirectPort=&quot;8443&quot;
acceptCount=&quot;100&quot;
connectionTimeout=&quot;20000&quot;
disableUploadTimeout=&quot;true&quot;
/>
<Engine name=&quot;Catalina&quot;
defaultHost=&quot;localhost&quot;>
<Realm className=&quot;org.apache.catalina.realm.UserDatabaseRealm&quot;
resourceName=&quot;UserDatabase&quot;/>
<Host name=&quot;localhost&quot;
appBase=&quot;webapps&quot;
unpackWARs=&quot;true&quot;
autoDeploy=&quot;true&quot;
xmlValidation=&quot;false&quot;
xmlNamespaceAware=&quot;false&quot;>
<Context path=&quot;/dodo&quot;
docBase=&quot;/home/dodo/tomcat&quot;
debug=&quot;0&quot;
reloadable=&quot;true&quot;
crossContext=&quot;true&quot;>
</Context>
</Host>
</Engine>
</Service>
</Server>
此配置和在win2000下的配置的一样,win2000下的我已经试验成功,jsp和servlet都已经工作正常,可在Linux下出现如下的错误:
HTTP Status 404 - /
--------------------------------------------------------------------------------
type Status report
message /
description The requested resource (/) is not available.
--------------------------------------------------------------------------------
Apache Tomcat/5.5.14
哪位大侠有此方面的经验,还望不吝赐教!
 
<Context path=&quot;/dodo&quot;
docBase=&quot;tomcat&quot;
debug=&quot;0&quot;

docBase 直接写你web的路径
/home/dodo/tomcat这个路径下是什么?
 
哎!
问题终于解决了!
我又新建了个tomcat用户就OK了!
不过方法有些莫名其妙,我也没弄懂为什么这样就可以了!
还望高手帮忙给解释一下!
 
后退
顶部