请教一个tomcat context.xml配置问题
请教一个tomcat配置问题:
假设我的Tomcat安装目录为$CATALINA_HOME
1.$CATALINA_HOME\conf\server.xml中的Host配置如下:
<Host name= "localhost " appBase= "webapps "
unpackWARs= "true " autoDeploy= "true " xmlValidation= "false " xmlNamespaceAware= "false ">
</Host>
2.$CATALINA_HOME\webapps\sonny.war 即在$CATALINA_HOME\webapps目录中发布一个名叫sonny.war的web应用
sonny.war 目录结构如下:
sonny.war|
|META-INF|context.xml
|WEB-INF|web.xml
|WEB-INF|classes
|WEB-INF|lib
|index.jsp
context.xml内容如下:
<Context path= "/demo " docBase= "C:/tomcat-6.0.9/webapps/sonny.war "
debug= "0 " privileged= "true ">
<Realm className= "org.apache.catalina.realm.JDBCRealm " debug= "99 "
driverName= "com.mysql.jdbc.Driver "
connectionURL= "jdbc:mysql://127.0.0.1:3306/mydb?user=root&password= "
userTable= "users " userNameCol= "user_name " userCredCol= "user_pass "
userRoleTable= "user_roles " roleNameCol= "role_name "/>
</Context>
问题:
发布后在ie地址输入:http://localhost:8080/demo/index.jsp 按回车后显示提示如下:
The requested resource (/demo/index.jsp) is not available.
这表明context.xml文件似乎没起到作用, 请指点, 多谢!
注:tomcat版本5.5, 和6.0.9均试过
------解决方案--------------------帮顶