记录:tomcat,404错误,虚拟目录,listings设置,Tomcat Native library报错
来源:互联网 发布:淘宝法规在哪里 编辑:程序博客网 时间:2024/06/04 18:49
===========================学习tomcat的点滴记录=============================================================================
系统重装后,配置好jdk和tomcat环境变量,把项目test1复制到重装的tomcat的webapps下,tomcat能够运行。
进http://localhost:8080/manager/html,打开test1,出来404报错页面。
针对本机出现的问题最后解决方法:test1项目里面没有index.html这样的默认页面。加入index.html后,可以正常打开。
我要求的是没有index.html,可以在http://localhost:8080里面点test1,出来test1里面的目录。
如是在conf文件里的web.xml进行修改:
<init-param> <param-name>listings</param-name> <param-value>true</param-value> </init-param>
listings的值默认为false,设置为true,就行显示目录。
============================过程记录=======================================
查看logs,发现提示为:Tomcat Native library是1.1.1,要求1.1.8,于是网上下了tcnative-1.dll的1.1.8版本,放到bin目录下面。
tomcat运行没有错误了。
可还是报404错误。http://localhost:8080/能够打开,发现除了本身root项目能运行,只有docs这个项目能够打开。
而这两个项目有个共同点就是都有index.html。于是给test1加入默认页index.html(默认主页可以在conf/web.xml里面修改welcome-file-list),test1可以运行。
因为我的test1项目里面是测试用,有多个测试例子,所以不希望每次从主页跳,之前是直接能目录显示test1里面的文件。
看conf文件夹的web.xml的welcome-file-list上面的注释发现:
<!-- ==================== Default Welcome File List ===================== --> <!-- When a request URI refers to a directory, the default servlet looks --> <!-- for a "welcome file" within that directory and, if present, --> <!-- to the corresponding resource URI for display. If no welcome file --> <!-- is present, the default servlet either serves a directory listing, --> <!-- or returns a 404 status, depending on how it is configured. --> <!-- --> <!-- If you define welcome files in your own application's web.xml --> <!-- deployment descriptor, that list *replaces* the list configured --> <!-- here, so be sure that you include any of the default values that --> <!-- you wish to include. -->
大意是默认找welcom file,如果找不到,就返回目录或404错误,返回什么取决于设置。
在网上查了下设置目录为listings这个参数,于是找到web.xml里面的servlet下,修改listings的值为true(默认为false)。结果成功。
- 记录:tomcat,404错误,虚拟目录,listings设置,Tomcat Native library报错
- tomcat 启动报错 the APR based Apache Tomcat Native library版本错误
- Tomcat 启动,错误:The APR based Apache Tomcat Native library
- Tomcat 报错的解决方法:The APR based Apache Tomcat Native library which allows optimal
- Tomcat 起动报错The APR based Apache Tomcat Native library which.
- Tomcat 报错的解决方法:The APR based Apache Tomcat Native library which allows optimal
- 安装tomcat native-library
- Apache Tomcat Native library
- Apache Tomcat Native Library
- tomcat使用虚拟目录后报404
- Tomcat虚拟目录设置
- Tomcat虚拟目录设置
- Tomcat虚拟目录设置
- Tomcat虚拟目录设置
- Tomcat虚拟目录设置
- 设置TOMCAT 虚拟目录
- Tomcat虚拟目录设置
- Tomcat虚拟目录设置
- linux下强行umount卸载设备
- Matlab数据导入导出
- unknown filesystem grub rescue 完美解决
- uCOS-II任务机制
- 工厂函数、动态加载、效率,一个都不能少!
- 记录:tomcat,404错误,虚拟目录,listings设置,Tomcat Native library报错
- 配置java连接池 tomcat方式、Spring方式配置的比较(修正版)
- Xcode教程 Xcode4发布测试 打包Archive操作
- jQuery 选取具有特定value的option
- js sort 数组排序
- In App purchase 关于Restore被拒问题(已经通过)
- 端午节将至,吃粽子有讲究哦
- 保护DNS服务器详解
- 用js判断浏览器是否是IE的比较好的办法