Tag: TOMCAT预览模式: 普通 | 列表
08-09
12

Tomcat中web.xml文件的详细说明

Tomcat中web.xml文件的详细说明
<?xml version="1.0" encoding="GB2312"?> <!--
Web.xml依次定议了如下元素:
<web-app>
<display-name></display-name> 定义了WEB应用的名字
<description></description> 声明WEB应用的描述信息
<filter></filter>
<filter-mapping></filter-mapping>
<servlet></servlet>

查看更多...

Tags: TOMCAT

分类:学习 | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 591
08-06
25

Tomcat中显示目录中的文件列表

在Tomcat中我们在IE地址栏中输入的URL是一个目录时,会
自动将目录下的文件给列举出来。最近有同学学Tomcat5.5
就不可以,其实主要是修改一下web.xml中的参数就可以了。

在conf/web.xml中修改 listings参数的值为true

<servlet>
        <servlet-name>default</servlet-name>
        <servlet-class>

查看更多...

Tags: TOMCAT 文件列表

分类:学习 | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 994
08-06
10

TOMCAT 严重: Error filterStart

今天在eclipse+myeclipse+tomcat5 下,写个中文乱码转码filter,就报
2007-3-13 17:43:46 org.apache.catalina.core.StandardContext start
严重: Error filterStart
2007-3-13 17:43:46 org.apache.catalina.core.StandardContext start
严重: Context startup failed due to previous errors
错误,所属项目也就启动不了,web。xml配置为 :
<filter>
    <filter-name>CharsetEncodingFilter</filter-name>
    <filter-class>com.changyou.filter.CharsetEncodingFilter</filter-class>

查看更多...

Tags: TOMCAT

分类:Java&Jsp | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 2157
08-05
27

Exception Processing ErrorPage[errorCode=404,location=*.jsp]

Exception Processing ErrorPage[errorCode=404,location=*.jsp]
java.net.SocketException: Connection reset by peer: socket write error
出现这样的错误源于web.xml的配置,起初配置的是:
        <error-page>
        <error-code>404</error-code>
        <location>/index.do</location>
        </error-page>


更改为文件名错误解除:

查看更多...

Tags: Exception TOMCAT

分类:Java&Jsp | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 2110
08-04
30

更改tomcat默认首页的方法

     在webapps\ROOT下放置index.htm就可用执行,而index.jsp反而不执行,也有很多人在讨论这个问题。
解决方法如下:
     修改server.xml文件,在Host 里面的加入以下的代码:  

    <Context path="" docBase="C:\wwwroot\" workDir="C:\wwwroot\"  />


       其中path是为"", 不是"/" , docBase就是你放置网页的目录, workDir也是你放置网页的目录,并且这个参数必不可少,我在添加代码的时候没有添加这个参数,搞得不能运行.那么整体的代码如下:        

查看更多...

Tags: TOMCAT

分类:Java&Jsp | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 1118
08-03
29

tomcat中设置session时间

1. 在server.xml中定义context时采用如下定义:
<Context path="/livsorder" docBase="/home/httpd/html/livsorder"      
  defaultSessionTimeOut="3600" isWARExpanded="true"      
  isWARValidated="false" isInvokerEnabled="true"      
  isWorkDirPersistent="false"/>  


2. 在web.xml中通过参数指定:
<session-config>    
    <session-timeout>30</session-timeout>      

查看更多...

Tags: session TOMCAT

分类:Java&Jsp | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 642