- 浏览: 545126 次
- 性别:
- 来自: 北京
文章分类
- 全部博客 (618)
- java (109)
- Java web (43)
- javascript (52)
- js (15)
- 闭包 (2)
- maven (8)
- 杂 (28)
- python (47)
- linux (51)
- git (18)
- (1)
- mysql (31)
- 管理 (1)
- redis (6)
- 操作系统 (12)
- 网络 (13)
- mongo (1)
- nginx (17)
- web (8)
- ffmpeg (1)
- python安装包 (0)
- php (49)
- imagemagic (1)
- eclipse (21)
- django (4)
- 学习 (1)
- 书籍 (1)
- uml (3)
- emacs (19)
- svn (2)
- netty (9)
- joomla (1)
- css (1)
- 推送 (2)
- android (6)
- memcached (2)
- docker、 (0)
- docker (7)
- go (1)
- resin (1)
- groovy (1)
- spring (1)
最新评论
-
chokee:
...
Spring3 MVC 深入研究 -
googleyufei:
很有用, 我现在打算学学Python. 这些资料的很及时.
python的几个实用网站(转的) -
hujingwei1001:
太好了找的就是它
easy explore -
xiangtui:
例子举得不错。。。学习了
java callback -
幻影桃花源:
太好了,謝謝
Spring3 MVC 深入研究
配置Tomcat直接显示目录结构和文件列表
TomcatServletApacheWebXML
tomcat版本:apache-tomcat-6.0.20
Tomcat是直接显示目录结构和文件列表,只是在配置里面给关闭了。
关键在这里:
Java代码 收藏代码
..\apache-tomcat-6.0.20\conf\web.xml
这个文件有一段配置直接控制Tomcat是允许显示目录结构和文件列表。
Java代码 收藏代码
<servlet>
<servlet-name>default</servlet-name>
<servlet-class>org.apache.catalina.servlets.DefaultServlet</servlet-class>
<init-param>
<param-name>debug</param-name>
<param-value>0</param-value>
</init-param>
<init-param>
<param-name>listings</param-name>
<param-value>false</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
把listings选项改为true就可以了。
org.apache.catalina.servlets.DefaultServlet支持许多配置选项,在这个web.xml文件里面都有注释。
Java代码 收藏代码
<!-- The default servlet for all web applications, that serves static -->
<!-- resources. It processes all requests that are not mapped to other -->
<!-- servlets with servlet mappings (defined either here or in your own -->
<!-- web.xml file. This servlet supports the following initialization -->
<!-- parameters (default values are in square brackets): -->
<!-- -->
<!-- debug Debugging detail level for messages logged -->
<!-- by this servlet. [0] -->
<!-- -->
<!-- fileEncoding Encoding to be used to read static resources -->
<!-- [platform default] -->
<!-- -->
<!-- input Input buffer size (in bytes) when reading -->
<!-- resources to be served. [2048] -->
<!-- -->
<!-- listings Should directory listings be produced if there -->
<!-- is no welcome file in this directory? [false] -->
<!-- WARNING: Listings for directories with many -->
<!-- entries can be slow and may consume -->
<!-- significant proportions of server resources. -->
<!-- -->
<!-- output Output buffer size (in bytes) when writing -->
<!-- resources to be served. [2048] -->
<!-- -->
<!-- readonly Is this context "read only", so HTTP -->
<!-- commands like PUT and DELETE are -->
<!-- rejected? [true] -->
<!-- -->
<!-- readmeFile File name to display with the directory -->
<!-- contents. [null] -->
<!-- -->
<!-- sendfileSize If the connector used supports sendfile, this -->
<!-- represents the minimal file size in KB for -->
<!-- which sendfile will be used. Use a negative -->
<!-- value to always disable sendfile. [48] -->
<!-- -->
<!-- useAcceptRanges Should the Accept-Ranges header be included -->
<!-- in responses where appropriate? [true] -->
<!-- -->
<!-- For directory listing customization. Checks localXsltFile, then -->
<!-- globalXsltFile, then defaults to original behavior. -->
<!-- -->
<!-- localXsltFile Make directory listings an XML doc and -->
<!-- pass the result to this style sheet residing -->
<!-- in that directory. This overrides -->
<!-- globalXsltFile[null] -->
<!-- -->
<!-- globalXsltFile Site wide configuration version of -->
<!-- localXsltFile This argument is expected -->
<!-- to be a physical file. [null] -->
<!-- -->
<!-- -->
可以多看看,多多益处。
TomcatServletApacheWebXML
tomcat版本:apache-tomcat-6.0.20
Tomcat是直接显示目录结构和文件列表,只是在配置里面给关闭了。
关键在这里:
Java代码 收藏代码
..\apache-tomcat-6.0.20\conf\web.xml
这个文件有一段配置直接控制Tomcat是允许显示目录结构和文件列表。
Java代码 收藏代码
<servlet>
<servlet-name>default</servlet-name>
<servlet-class>org.apache.catalina.servlets.DefaultServlet</servlet-class>
<init-param>
<param-name>debug</param-name>
<param-value>0</param-value>
</init-param>
<init-param>
<param-name>listings</param-name>
<param-value>false</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
把listings选项改为true就可以了。
org.apache.catalina.servlets.DefaultServlet支持许多配置选项,在这个web.xml文件里面都有注释。
Java代码 收藏代码
<!-- The default servlet for all web applications, that serves static -->
<!-- resources. It processes all requests that are not mapped to other -->
<!-- servlets with servlet mappings (defined either here or in your own -->
<!-- web.xml file. This servlet supports the following initialization -->
<!-- parameters (default values are in square brackets): -->
<!-- -->
<!-- debug Debugging detail level for messages logged -->
<!-- by this servlet. [0] -->
<!-- -->
<!-- fileEncoding Encoding to be used to read static resources -->
<!-- [platform default] -->
<!-- -->
<!-- input Input buffer size (in bytes) when reading -->
<!-- resources to be served. [2048] -->
<!-- -->
<!-- listings Should directory listings be produced if there -->
<!-- is no welcome file in this directory? [false] -->
<!-- WARNING: Listings for directories with many -->
<!-- entries can be slow and may consume -->
<!-- significant proportions of server resources. -->
<!-- -->
<!-- output Output buffer size (in bytes) when writing -->
<!-- resources to be served. [2048] -->
<!-- -->
<!-- readonly Is this context "read only", so HTTP -->
<!-- commands like PUT and DELETE are -->
<!-- rejected? [true] -->
<!-- -->
<!-- readmeFile File name to display with the directory -->
<!-- contents. [null] -->
<!-- -->
<!-- sendfileSize If the connector used supports sendfile, this -->
<!-- represents the minimal file size in KB for -->
<!-- which sendfile will be used. Use a negative -->
<!-- value to always disable sendfile. [48] -->
<!-- -->
<!-- useAcceptRanges Should the Accept-Ranges header be included -->
<!-- in responses where appropriate? [true] -->
<!-- -->
<!-- For directory listing customization. Checks localXsltFile, then -->
<!-- globalXsltFile, then defaults to original behavior. -->
<!-- -->
<!-- localXsltFile Make directory listings an XML doc and -->
<!-- pass the result to this style sheet residing -->
<!-- in that directory. This overrides -->
<!-- globalXsltFile[null] -->
<!-- -->
<!-- globalXsltFile Site wide configuration version of -->
<!-- localXsltFile This argument is expected -->
<!-- to be a physical file. [null] -->
<!-- -->
<!-- -->
可以多看看,多多益处。
发表评论
-
HTTP协议之multipart/form-data请求分析
2015-11-09 17:41 735原文地址:http://blog.csdn ... -
Servlet中的过滤器(拦截器)Filter与监听器Listener的作用和区别
2015-10-30 18:01 1019原文地址:http://blog.csdn.net/mmllk ... -
过滤器和拦截器的区别
2015-10-30 18:00 633原文地址:http://blog.163.com/hzd_lo ... -
过滤器、监听器、拦截器的区别
2015-10-30 17:59 558原文地址:http://blog.csdn.net/x_yp/ ... -
【JSP】让HTML和JSP页面不缓存的方法
2015-10-14 10:16 446原文地址:http://blog.csdn.net/juebl ... -
jsp去掉浏览器缓存
2015-10-14 09:21 590原文地址:http://bbs.csdn.net/topics ... -
pageContext对象的用法
2015-09-04 21:24 663原文地址:http://blog.csdn.net/warcr ... -
log4j日志文件乱码问题的解决方法
2015-01-06 18:11 787原文地址:http://blog.csdn.net/inkfi ... -
JEECMS 系统权限设计
2014-09-05 16:25 912原文地址:http://chinajweb.iteye.com ... -
使用servlet保存用户上传的文件到本地
2014-08-12 14:46 603原文地址:http://blog.csdn.net/shuwe ... -
Servlet 实现文件的上传与下载
2014-08-12 14:44 861原文地址:http://www.2cto.com/kf/201 ... -
android文件上传到服务器
2014-08-12 11:03 362代码非原创,fix了bug,完善的还是需要再思量: /** * ... -
常用社交网络(SNS、人人网、新浪微博)动态新闻(feed、新鲜事、好友动态)系统浅析
2014-08-05 15:09 903原文地址:http://blog.csdn.net/sunme ... -
Feed系统架构资料收集
2014-08-05 15:08 593原文地址:http://blog.csdn ... -
微博feed系统推拉模式和时间分区拉模式架构探讨
2014-08-05 14:47 379原文地址:http://www.csdn.net/articl ... -
spring 出错,Could not find acceptable representation
2014-08-03 14:41 1458原文地址:http://www.myexception.cn/ ... -
spring @ResponseBody 返回json格式有关问题
2014-08-03 14:20 602原文地址:http://www.myexception.cn/ ... -
httpclient上传文件及传参数
2014-07-27 14:02 1173原文地址:http://hyacinth.blog.sohu. ... -
在eclipse中把java工程变为web工程
2014-06-27 11:18 686项目上点鼠标右键->properties->Pro ... -
压力测试工具apache-ab讲解
2012-10-16 09:59 709最近在做webservices,得到的数据是从德国那边的服务器 ...
相关推荐
然后在Tomcat目录里面的C:\Tomcat\webapps\ROOT里面按如下的文件结构: ROOT\index.html ROOT\welcom.jsp ROOT\WEB-INF\lib\MyServlet.jar(如果你的servlet的.class打成了.jar文件,则放在 lib下面) ROOT\WEB-...
JavaWeb期刊管理系统_课程设计附课设报告。...配置你的tomcat(idea右上角添加运行配置,导入你的tomcat,然后idea会提示修正项目,修正即可,之后,上面会显示工程访问路径,点击就可以访问) 进行访问即可
3.还有一种情况,就是在你的eclipse或者myeclipse从没运行过Java web程序的时候,就是说tomcat没有配置的时候,可能会出现httpservlet错误的提示,此时有两种方法可以解决,(1)配置tomcat,运行项目的时候选择配置...
2、在MySQL中创建数据库,使用MySQL Control Center执行database目录下的dbscript.sql数据库脚本文件创建数据库SQL语句创建数据库和表及数据; 3、设置数据库连接配置,修改src目录下的database.properties文件,将...
目录 前言 第1部分 介绍数据库、SQL和JDBC 第1章 关系型数据库 1.1 理解关系型数据库管理系统 1.1.1 关系模型 1.1.2 Codd法则 1.1.3 表、行、列和关键字 1.1.4 主键 1.1.5 外键 1.1.6 关系 1.1.7 视图...
目录 前言 第1部分 介绍数据库、SQL和JDBC 第1章 关系型数据库 1.1 理解关系型数据库管理系统 1.1.1 关系模型 1.1.2 Codd法则 1.1.3 表、行、列和关键字 1.1.4 主键 1.1.5 外键 1.1.6 关系 1.1.7 视图...
目录 前言 第1部分 介绍数据库、SQL和JDBC 第1章 关系型数据库 1.1 理解关系型数据库管理系统 1.1.1 关系模型 1.1.2 Codd法则 1.1.3 表、行、列和关键字 1.1.4 主键 1.1.5 外键 1.1.6 关系 1.1.7 视图...
目录 前言 第1部分 介绍数据库、SQL和JDBC 第1章 关系型数据库 1.1 理解关系型数据库管理系统 1.1.1 关系模型 1.1.2 Codd法则 1.1.3 表、行、列和关键字 1.1.4 主键 1.1.5 外键 1.1.6 关系 1.1.7 视图...
系统配置:win2000英文版+JDK1.4.1+TOMCAT4.0.5+...5. 将硬盘一指定目录以列表的形式显示出来,自动查找目录中的说明文件,并解析其结构,当访问到含有说明文件的目录时,将解析结果一并显示出来。6. LEO论坛(C
3.2.19设置编辑器字体,颜色和显示行号 63 3.2.20 Link文件 64 3.2.21安装插件 65 3.2.22获取帮助和阅读帮助文档 65 3.2.23 CVS团队源代码管理(在线阅读) 66 3.2.24 修改文件的字符编码 66 3.3小结 66 第四章 用...
打开在eclipse中选定文件所在的目录。 5.Fat Jar 打包插件,可以方便的完成各种打包任务,可以包含外部的包等 6.RegEx Test 测试正则表达式 7.AdvanQas 提供对if/else等条件语句的提示和快捷帮助(自动更改...
“资源”是指网站前台页面经常需要引用到的图片、css、js、flash等文件,javapms将这些文件都分类存放在了程序指定的目录中,管理员可以系统后台进行上传,删除,修改等管理操作,替代了传统的ftp管理方式。...
1.智能小区物业管理系统(SmartHouse)是基于B/S结构,源程序中build目录下包含系统编译的class类文件和系统配置文件。src目录包含了系统的源程序。webcontent包含了网站的页面资源和一些脚本源代码。 2.运行系统需要...
目录 第1章 JDBC概述 1.1 JDBC简介 1.2 JDBC3.0规范 1.3 JDBC3.0 API的新特点 1.3.1 JDBC 3.0 API的一致性 1.3.2 不赞成的API 1.4 JDBC 3.0中的类和接口 1.4.1 java.sql包中的类和接口及其使用 1.4.2 ...
7.1 配置任意目录下的web应用程序 240 7.2 war文件 242 7.3 tomcat中servlet的另一种运行方式 244 7.4 与servlet配置相关的元素 247 7.4.1 [servlet]元素及其子元素 247 7.4.2 [servlet-mapping]元素及其子元素...
7.1 配置任意目录下的web应用程序 240 7.2 war文件 242 7.3 tomcat中servlet的另一种运行方式 244 7.4 与servlet配置相关的元素 247 7.4.1 [servlet]元素及其子元素 247 7.4.2 [servlet-mapping]元素及其子元素...
7.1 配置任意目录下的web应用程序 240 7.2 war文件 242 7.3 tomcat中servlet的另一种运行方式 244 7.4 与servlet配置相关的元素 247 7.4.1 [servlet]元素及其子元素 247 7.4.2 [servlet-mapping]元素及其子元素...
7.1 配置任意目录下的web应用程序 240 7.2 war文件 242 7.3 tomcat中servlet的另一种运行方式 244 7.4 与servlet配置相关的元素 247 7.4.1 [servlet]元素及其子元素 247 7.4.2 [servlet-mapping]元素及其子元素...
2.4 配置apachetomcat 2.5 配置macromediajrun 2.6 配置cauchoresin 2.7 建立开发环境 2.8 测试系统的设置 2.9 实现简化的部署方法 2.10 默认web应用的部署目录:汇总 2.11 web应用:预览 第3章 ...
V512工作室Java web的ppt 第1章 讲解本书中所使用的Java Web开发工具Eclipse 3.3、MyEclipse 6.0和Tomcat6的安装、配置和使用。...第19章 讲解Java Web应用的目录结构和web.xml文件中主要元素的含义。