首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > Web前端 >

webServer tomcat 五 / tomcat6 / tomcat7

2013-09-11 
webServer tomcat 5 /tomcat6 / tomcat7Jakata tomcat5 http://mirrors.ccs.neu.edu/Apache/dist/tomcat/t

webServer tomcat 5 / tomcat6 / tomcat7

Jakata tomcat5

http://mirrors.ccs.neu.edu/Apache/dist/tomcat/tomcat-5/

http://archive.apache.org/dist/jakarta/tomcat-5/?

http://tomcat.apache.org/

http://labs.xiaonei.com/ 由校内网维护的Apache下载镜像

http://tomcat.apache.org/download-55.cgi

http://apache.mirror.phpchina.com/tomcat/tomcat-5/v5.5.26/bin/apache-tomcat-5.5.26.zip

http://apache.mirror.phpchina.com/tomcat/tomcat-5/v5.5.26/bin/apache-tomcat-5.5.26-admin.zip

http://tomcat.apache.org/download-60.cgi

http://apache.mirror.phpchina.com/tomcat/tomcat-6/v6.0.16/bin/apache-tomcat-6.0.16.zip

http://tomcat.apache.org/download-native.cgi

http://apache.mirror.phpchina.com/tomcat/tomcat-connectors/native/1.1.14/binaries/win32/

http://apache.mirror.phpchina.com/tomcat/tomcat-connectors/native/1.1.16/binaries/win32/

http://tomcat.apache.org/download-connectors.cgi

http://apache.mirror.phpchina.com/tomcat/tomcat-connectors/

http://apache.mirror.phpchina.com/tomcat/tomcat-connectors/jk/binaries/win32/jk-1.2.26/

Tomcat5 添加管理控制台

http://localhost:8080/admin

AdministrationTomcat's administration web application is no longerinstalled by default. Download and install the "admin" package to useit.

添加 Tomcat Administration Username

D:\Program Files\Apache Software Foundation\apache-tomcat-5.5.28

?

添加 Tomcat Administration Application Configuration

D:\Program Files\Apache Software Foundation\apache-tomcat-5.5.28\conf\Catalina\localhost\admin.xml

?

?

?

添加 Tomcat Administration Application

http://labs.xiaonei.com/apache-mirror/tomcat/tomcat-5/v5.5.28/bin/apache-tomcat-5.5.28-admin.zip

D:\Program Files\Apache Software Foundation\apache-tomcat-5.5.28\server\webapps\admin

Tomcat6 配置 Tomcat?Manager

http://localhost:8080/manager

401 Unauthorized

You are not authorized to view this page. If you have not changed any configuration files, please examine the file conf/tomcat-users.xml in your installation. That file will contain the credentials to let you use this webapp.

You will need to add manager role to the config file listed above. For example:

<role rolename="manager"/> <user username="tomcat" password="s3cret" roles="manager"/>

For more information - please see the Manager App HOW-TO .

修改文件:D:\Program Files\apache-tomcat-6.0.20\conf\tomcat-users.xml

?

Tomcat 7 添加配置web管理控制台 ,注意下载版本32/64, 这个也适用于apache-tomcat-6.0.32。

?

http://hi.baidu.com/everything%5Fis%5Ftruth/blog/item/cc115910616ecad5a6ef3f07.html

修改文件 D:\soft\apache-tomcat-7.0.22\conf\tomcat-users.xml

?

Tomcat5 外引项目配置

<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee "
?xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance " xsi:schemaLocation="http://java.sun.com/xml/ns/javaee ?? http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd ">

?<!--?其中加入应用JNDI配置 -->

?<resource-ref>
? <description>DB?Connection </description>

?? <!-- JNDI 命名-->
? <res-ref-name>jdbc/oracle </res-ref-name>
? <res-type>javax.sql.DataSource</res-type>
? <res-auth>Application </res-auth>
?</resource-ref>

?<resource-ref>
? <description>DB?Connection </description>
? <res-ref-name>jdbc/oracle </res-ref-name>
? <res-type>javax.sql.DataSource</res-type>
? <res-auth>Container </res-auth>
?</resource-ref>

</web-app>

Tomcat 6 数据源与连接池配置 方法二

project:test

Driver path:

D:\workspace\test\WebRoot\WEB-INF\lib\ojdbc14.10g.jar

Datasource config

D:\tomcat6.0\conf\Catalina\localhost\test.xml

D:\tomcat6.0\conf \context.xml

<?xml version="1.0" encoding="UTF-8"?>
<Context path="/test " docBase="D:\workspace\test\WebRoot " reloadable="true">

<!-- 其中将数据源参数配置在tomcat局部连接池中-->
??<Resource name="jdbc/oracle"
????? type="javax.sql.DataSource"
????? username="scott"
????? password="tiger"
????? driverClassName="oracle.jdbc.OracleDriver"

???? ?validationQuery="select 1 from dual"
????? maxIdle="2"
????? maxWait="5000"
????? url="jdbc:oracle:thin:@localhost:1521:orcl"
????? maxActive="4"/>
</Context>

page test ok

D:\workspace\test\WebRoot\index.jsp

<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
?String path = request.getContextPath();
?String basePath = request.getScheme() + "://"
???+ request.getServerName() + ":" + request.getServerPort()
???+ path + "/";
%>

<%@ page import="java.sql.*"%>
<%@ page import="javax.naming.*"%>
<%@ page import="javax.sql.*"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
?<head>
??<base href="<%=basePath%>">

??<title>tomcat datasource test</title>
??<meta http-equiv="pragma" content="no-cache">
??<meta http-equiv="cache-control" content="no-cache">
??<meta http-equiv="expires" content="0">
??<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
??<meta http-equiv="description" content="This is my page">
??<!--
?<link rel="stylesheet" type="text/css" href="styles.css">
?-->
?</head>

?<body>
??<%
???Context initContext = new InitialContext();
???//java:/comp/env 或? java:/comp/env/ 固定写法
???Context envContext = (Context) initContext
?????.lookup("java:/comp/env/");
???DataSource ds = (DataSource) envContext.lookup("jdbc/oracle");
???//方法二
???//DataSource ds = (DataSource) initContext.lookup("java:/comp/env/jdbc/oracle");

???Connection conn = ds.getConnection();
???Statement stmt = conn.createStatement();
???ResultSet rs = stmt.executeQuery("select * from dept");

???out.println("结果集是否为空:" + (rs == null) + "<p>");

???while (rs.next()) {
????String deptno = rs.getString(1);
????String dname = rs.getString(2);
????String loc = rs.getString(3);
????out.println("\t部门编号:" + deptno + "\t部门名称:" + dname + "??? 地点:"
??????+ "\t" + loc + "<p>");
???}
???out.println("finally");
???try {
????if (rs != null) {
?????rs.close();
????}
????if (stmt != null) {
?????stmt.close();
????}
????if (conn != null) {
?????conn.close();
????}
???} catch (SQLException e2) {
????e2.printStackTrace();
???}
??%>
?</body>
</html>

tomcat 虚拟主机配置

http://absolute007.iteye.com/blog/175902

????????????? <Context path="" docBase="." debug="0"/>
?????? </Host>
第二步、
对于windows XP:
\WINDOWS\system32\drivers\etc\

中找到hosts这个文件,此文件没有扩展名,可以手工创建。后面添加
127.0.0.1?????? localhost
127.0.0.1??????jsp

?第三步:

浏览器中输入

http://jsp:8008/jspsqltest/WebRoot/test.jsp

一切完成

tomcat5 优化配置

http://liliugen.iteye.com/blog/265422

http://liliugen.iteye.com/blog/265506


http://japi.iteye.com/blog/261586

java.lang.OutOfMemoryError: PermGen space

tomcat 最大连接数配置

http://maqianli.iteye.com/blog/298619

在server.xml中有配置的。 ??
<Connector ? port="8080" ??
? ? maxThreads="150" ??
? ? minSpareThreads="25" ??
? ? maxSpareThreads="75" ??
? ? acceptCount="100" ??
? ? /> ??
maxThreads="150" ????? 表示最多同时处理150个连接 ??
minSpareThreads="25" ? 表示即使没有人使用也开这么多空线程等待 ??
maxSpareThreads="75" ? 表示如果最多可以空75个线程,例如某时刻有80人访问,之后没有人访问了,则tomcat不会保留80个空线程,而是关闭5个空的。 ??
??
acceptCount="100" ???? 当同时连接的人数达到maxThreads时,还可以接收排队的连接,超过这个连接的则直接返回拒绝连

接。

Tomcat集群的三种负载均衡方式优缺点对照。

http://wangdei.iteye.com/blog/205947
1.使用DNS轮询.2.使用Apache R-proxy方式。3.使用Apache mod_jk方式.?DNS轮询的缺点是,当集群中某台服务器停止之后,用户由于dns缓存的缘故,便无法访问服务,必须等到dns解析更新,或者这台服务器重新启动。还有就是必须把集群中的所有服务端口暴露给外界,没有用apache做前置代理的方式安全,并且占用大量公网IP地址,而且tomcat还要负责处理静态网页资源,影响效率。优点是集群配置最简单,dns设置也非常简单。?R-proxy的缺点是,当其中一台tomcat停止运行的时候,apache仍然会转发请求过去,导致502网关错误。但是只要服务器再启动就不存在这个问题。?mod_jk方式的优点是,Apache 会自动检测到停止掉的tomcat,然后不再发请求过去。缺点就是,当停止掉的tomcat服务器再次启动的时候,Apache检测不到,仍然不会转发请求过去。?R-proxy和mod_jk的共同优点是.可以只将Apache置于公网,节省公网IP地址资源。可以通过设置来实现Apache专门负责处理静态网页,让Tomcat专门负责处理jsp和servlet等动态请求。共同缺点是:如果前置Apache代理服务器停止运行,所有集群服务将无法对外提供。R-proxy和mod_jk对静态页面请求的处理,都可以通设置来选取一个尽可能优化的效果。这三种方式对实现最佳负载均衡都有一定不足,mod_jk相对好些,可以通过设置lbfactor参数来分配请求任务。?所有这些在实际使用中都应该根据具体情况来选择。

?

本地查看远程端口8080是否开放
C:\Documents and Settings\Lindows>telnet 192.168.118.168 8000

tomcat 8080 端口冲突解决 方法一 (基于Windows系统)

http://inshect.iteye.com/blog/343057

dos 输入 ,并查看冲突端口号对应的PID(系统进程号)

C:\Documents and Settings\Lindows>netstat -help

C:\Documents and Settings\Lindows>netstat -b

C:\Documents and Settings\Lindows>netstat -ano > c:\netstat.txt

看看占用0.0.0:80端口的PID是多少
在“任务管理器”中查找对应PID的程序。
如果任务管理器的进程页中看不到PID栏,

则在任务管理器的菜单〖查看〗〖选择列〗中选择一下。删掉PID对应的程序即可。

tomcat 8080 端口冲突解决 方法二 (基于Windows系统重启)

windows 命令行下 简单好用的查看端口占用情况的方法
http://freeman983.iteye.com/blog/349971
在windows命令行窗口下执行:
C:\>netstat -ano | findstr "8080"

C:\>netstat -ano | findstr 8080
TCP??? 127.0.0.1:4444???????? 0.0.0.0:0????????????? LISTENING?????? 2434
由上面得知,端口被进程号为2434的进程占用,继续执行下面命令:
C:\>tasklist | findstr "2434"

C:\>tasklist | findstr 2434
javaw.exe???????????????????? 2434 Console???????????????? 0???? 16,064 K
c:\>taskkill? /f /im javaw.exe

tomcat 8080 端口冲突解决 方法三? (基于Linux系统重启)

http://www.blogjava.net/baizhihui19870626/articles/375249.html

# 扫瞄/查找本机正在开放的端口号及其服务名称

[root@Loadrunner_19 vsftpd]# nmap localhost

[root@Loadrunner_19 vsftpd]# nmap -p 0-65535 localhost

Starting Nmap 4.11 ( http://www.insecure.org/nmap/ ) at 2012-09-28 15:32 CST

mass_dns: warning: Unable to determine any DNS servers. Reverse DNS is disabled. Try using --system-dns or specify valid servers with --dns_servers
Interesting ports on Loadrunner_19 (127.0.0.1):
Not shown: 1673 closed ports
PORT???? STATE SERVICE
21/tcp?? open? ftp
22/tcp?? open? ssh
80/tcp?? open? http
111/tcp? open? rpcbind
631/tcp? open? ipp
666/tcp? open? doom
6000/tcp open? X11

# 扫瞄/查找指定机器段(Windows或Linux)正在开放的端口号及其服务名称

[root@Loadrunner_19 vsftpd]# nmap -PT 192.168.157.87-100

# 扫瞄/查找指定机器(Windows或Linux)正在开放的端口号及其服务名称

[root@Loadrunner_19 vsftpd]# nmap -PT 192.168.157.87

Starting Nmap 4.11 ( http://www.insecure.org/nmap/ ) at 2012-09-28 15:47 CST
mass_dns: warning: Unable to determine any DNS servers. Reverse DNS is disabled. Try using --system-dns or specify valid servers with --dns_servers
Interesting ports on 192.168.157.87:
Not shown: 1668 closed ports
PORT???? STATE SERVICE
21/tcp?? open? ftp
23/tcp?? open? telnet
135/tcp? open? msrpc
139/tcp? open? netbios-ssn
443/tcp? open? https
445/tcp? open? microsoft-ds
1025/tcp open? NFS-or-IIS
3389/tcp open? ms-term-serv
5001/tcp open? commplex-link
5002/tcp open? rfe
5003/tcp open? filemaker
6000/tcp open? X11
MAC Address: 00:50:56:9D:1C:D4 (VMWare)
Nmap finished: 1 IP address (1 host up) scanned in 1.527 seconds

# 查出 tomcat8080端口原来与自定义vsftp 8080端口冲突

[root@Loadrunner_19 vsftpd]# netstat -apln | grep 8080??

tcp??????? 0????? 0 0.0.0.0:8080 ???????????????? 0.0.0.0:*?????????????????? LISTEN????? 6630/vsftpd

# 利用lsof 查看正在运行的服务及进程号

[root@Loadrunner_19 vsftpd]# lsof -i :8080
COMMAND? PID USER?? FD?? TYPE? DEVICE SIZE NODE NAME
vsftpd? 6867 root??? 3u? IPv4 1338173?????? TCP *:ftp (LISTEN)

# 调出vsftp进程号并杀掉即可

[root@Loadrunner_19 vsftpd]# kill -9 6630

tcp??????? 0????? 0 0.0.0.0:8080 ???????????????? 0.0.0.0:*?????????????????? LISTEN????? 6630/vsftpd

?

Apache HTTP Server 与 Tomcat 的三种连接方式介绍

刘 冬 (javayou@gmail.com ), 开发工程师,  2007 年 1 月 15 日

http://www.ibm.com/developerworks/cn/opensource/os-lo-apache-tomcat/index.html

Tomcat SSL OpenSSL 443

终于搞定了Windows下Tomcat Web服务器的SSL配置

http://albertsong.iteye.com/blog/198344

http://www.myssl.cn/guide/install_openssl.asp

?

Tomcat6配置使用SSL双向认证 ?

http://www.openssl.cn/

http://www.openssl.org/

http://baike.baidu.com/view/300712.htm

http://tech.techweb.com.cn/thread-226423-1-2.html

使用OpenSSL API进行安全编程

http://www.ibm.com/developerworks/cn/linux/l-openssl.html

?

openssl生成pem建立CA

http://ideage.iteye.com/blog/356915

文章一:http://blog.chinaunix.net/u/11234/showart_290705.html

文章二:http://blog.chinaunix.net/u/11234/showart_291316.html

openssl简明使用手册

http://firefly.iteye.com/blog/177544

简要介绍了使用openssl来生成CA证书、申请证书、颁发证书以及撤销证书的过程?
1. 首先建立CA密钥:?
openssl genrsa -des3 -out ca.key 1024 (创建密钥)?
chmod 400 ca.key (修改权限为仅root能访问)?
openssl rsa -noout -text -in ca.key (查看创建的证书)?
2. 利用CA密钥自签署CA证书:?
openssl req -config openssl.cnf -new -x509 -days 3650 -key ca.key -out ca.crt?
chmod 400 ca.crt (修改权限为仅root能访问)?
openssl x509 -noout -text -in ca.crt (查看创建的证书)?
3. 创建服务器证书签署申请:?
openssl genrsa -des3 -out client.key 1024?
chmod 400 client.key (修改权限为仅root能访问)?
openssl rsa -noout -text -in client.key (查看创建的证书)?
4. 利用证书签署申请生成请求:?
openssl req -config openssl_client.cnf -new -key client.key -out client.csr?
openssl req -noout -text -in client.csr (查看创建的请求)?
5.进行证书签署:?
这时候需要先设置一下openssl的配置文件。?
modify openssl.cnf并根据这个配置文件创建相应的目录和文件。?
在创建了serial文件之后,还需要添加当前的八进制的serial number,如:01?
然后执行:?
openssl ca -config openssl_client.cnf -keyfile ca.key -cert ca.crt -in client.csr -out client.pem -days 1095?
这个certificate是BASE64形式的,要转成PKCS12才能装到IE,/NETSCAPE上.所以还要:?
openssl pkcs12 -export -in client.pem -inkey client.key -out clinet.pfx?
6.证书撤销:?
openssl ca -keyfile ca.key -cert ca.crt -revoke client.pem?
这时数据库被更新证书被标记上撤销的标志,需要生成新的证书撤销列表:?
openssl ca -gencrl -keyfile ca.key -cert ca.crt -out crl/test.crl?
查看证书撤销列表:?
openssl crl -noout -text -in crl/test.crl?
证书撤销列表文件要在WEB站点上可以使用,必须将crldays或crlhours和crlexts加到证书中:?
openssl ca -gencrl -config /etc/openssl.cnf -crldays 7 -crlexts crl_ext -out crl/sopac-ca.crl?

当虚拟目录不是在80端口且打开ssl时出错 ssl_error_rx_record_too_long?

?

?

【错误】如果网站URL是:http://ip:port/ 时,如果再在网站上启用ssl,在浏览器上访问:https://ip:port/ 将会收到如下错误:SSL 接收到一个超出最大准许长度的记录。错误码: ssl_error_rx_record_too_long

【原因】:

ssl协议默认是在web server的443端口监听,所以,访问ssl会产生如下形式的访问:http://ip:443/ 这样将与http://ip:port/ 里的port冲突。

【所以】:对https访问,web server会自己定位到导用的了ssl的网站(启用了ssql ,此网上就自动在443上监听)上。

【解决 】 :对https://ip:port/ 的访问可以省略port,如:对https://ip/

?

http://msn.ynet.com/view.jsp?oid=48723368+

javax.servlet.ServletException: Node with number 0 does not exist.

http://msn.sports.ynet.com/2008/view.jsp?oid=42362690

javax.servlet.ServletException: Node with number 42362690 does not exist.

?

【问题】

2009-3-12 15:06:31 org.apache.catalina.core.AprLifecycleListener lifecycleEvent
严重: An incompatible version 1.1.1 of the Apache Tomcat Native library is installed, while Tomcat requires version 1.1.3
2009-3-12 15:06:31 org.apache.catalina.core.AprLifecycleListener lifecycleEvent
信息: An older version 1.1.1 of the Apache Tomcat Native library is installed, while Tomcat recommends version greater than 1.1.4
2009-3-12 15:06:31 org.apache.coyote.http11.Http11AprProtocol init

【解决 】

http://tomcat.heanet.ie/native/1.1.8/binaries/win32/ 

http://topic.csdn.net/u/20080605/14/68376d57-bb1b-4b45-a489-13aa722f2e67.html

下载 http://tomcat.heanet.ie/native/1.1.8/binaries/win32/tcnative-1.dll? 目前版本1.1.8
1、把文件放入C:\WINDOWS\system32里。或D:\tomcat5.5\bin下,我就是这样解决的。
2、把它放在环境变量path中所指向的jdk的bin的目录下,例如,放在C: Javajdk1.5.0_09bin目录下?

Apache Tomcat Log

放到tomcat的bin目录中,然后crontab每天执行

Tomcat APR (Apache Portable Runtime)

ref

http://redalx.iteye.com/blog/162246

http://blog.csdn.net/tingya/archive/2006/04/15/664304.aspx

apr说白了就是如何在Tomcat中使用JNI的方式来读取文件以及进行网络传输, ?提高tomcat ?的IO效率。

apr可以大大提升Tomcat对静态文件的处理性能,同时如果你使用了HTTPS方式传输的话,也可以提升SSL的处理性能。

doc

http://apr ?.apache.org/

http://tomcat.apache.org/tomcat-5.5-doc/apr.html

http://tomcat ?.apache.org/tomcat ?-6.0-doc/apr ?.html

down

http://tomcat.heanet.ie/native/

http://tomcat.heanet.ie/native/1.1.9/binaries/win32/tcnative-1.dll

setup for Windows

直接下载编译好的二进制版本的dll库文件

http://tomcat.heanet.ie/native/1.1.9/binaries/win32/tcnative-1.dll来使Tomcat启用APR ?webServer tomcat 五 /  tomcat6 / tomcat7

setup for linux

在Linux下,可以直接解压和安装bin目录下的tomcat_native.tar.gz文件,编译之前要确保apr库已经安装,安装的方式:

# ./configure --with-apr=/usr/local/apr
# make
# make install

安装成功后还需要对tomcat设置环境变量,方法是在catalina.sh文件中增加一行:

CATALINA_OPTS="-Djava.library.path=/usr/local/apr/lib"

怎么才能判断Tomcat是否已经启用了APR库呢?方法是通过看Tomcat的启动日志

如果没有启用APR,则启动日志一般有这么一条:

org.apache.coyote.http11.Http11Protocol start

如果启用了APR,则这条日志就会变成:

?


使用了apr ?之后,如果使用了https,https的配置也需要作改变。需要用到openssl来进行证书文件的生成。?

<!-- ssl for?apr ?-->?
<Connector port="8443" maxHttpHeaderSize="8192"?
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"?
enableLookups="false" disableUploadTimeout="true"?
acceptCount="100" scheme="https" secure="true"?
clientAuth="false"?
SSLEngine="on"?
SSLCertificateFile="..\conf\ca\server.crt"?
SSLCertificateKeyFile="..\conf\ca\server.key" />?
linux下编译?
cd apache-tomcat ?-5.5.14/bin/tomcat ?-native-1.1.1/jni/native/?
./configure --with-apr ?=/usr/bin/apr ?-1-config --with-java-home=/usr/java/jdk1.5.0_06/?
make?
make install?
bin/catalina.sh?
加上?
CATALINA_OPTS="-Djava.library.path=/usr/local/apr ?/lib"

Apache Tomcat 商用列表

?

Apache Tomcat/5.5.23? Apache/2.0.61 (Unix) DAV/2 PHP/5.2.4 Server at msn.ent.ynet.com Port 80 http://msn.ent.ynet.com/photo.jsp?eid=57080047&bid=20331162&ofs=5&max=2
http://taobao.ent.ynet.com/photo.jsp?eid=49540108 502 Proxy Error Apache/2.0.61 (Unix) DAV/2 Server at taobao.ent.ynet.com Port 80
南京公安局 exceptionhttp://202.102.89.2/njga/addin/register/mainregister.jsp

HTTP Status 500 -

type?Exception report

message

description?The server encountered an internal error () that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: Request[/persionRegister] does not contain handler parameter named 'method'.  This may be caused by whitespace in the label text.org.apache.struts.actions.DispatchAction.unspecified(DispatchAction.java:215)org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:249)org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:187)org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)javax.servlet.http.HttpServlet.service(HttpServlet.java:690)javax.servlet.http.HttpServlet.service(HttpServlet.java:803)com.opensymphony.webwork.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:177)com.opensymphony.webwork.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:78)cn.myapps.base.web.filter.PersistenceFilter.doFilter(PersistenceFilter.java:29)cn.myapps.base.web.filter.SecurityFilter.doFilter(SecurityFilter.java:109)

note?The full stack trace of the root cause is available in the Apache Tomcat/6.0.14 logs.


Apache Tomcat/6.0.14

http://photograph.baihe.com/photograph/uploadFile.do;jsessionid=E6483BF8E57118CF4E21CF7F8C6DD18C

Apache Tomcat/5.5
javax.servlet.ServletException: Processing of multipart/form-data request failed. Read timed out
org.apache.commons.fileupload.FileUploadException: Processing of multipart/form-data request failed. Read timed ou

?

tomcat 添加gzip压缩

http://bsb654321.iteye.com/blog/649053

???????? maxThreads="250" strategy="ms" maxHttpHeaderSize="8192"
???????? emptySessionPath="true"
???????? enableLookups="false" redirectPort="8443" acceptCount="100"
???????? connectionTimeout="20000" disableUploadTimeout="true" URIEncoding="UTF-8"
????????????? compression="on"???
???????? compressionMinSize="2048"???
???????? noCompressionUserAgents="gozilla, traviata"???
???????? compressableMimeType="application/java-archive,application/octet-stream,text/vnd.sun.j2me.app-descriptor,application/octet-stream, application/x-msdownload, image/png, image/gif, ??????? <user username="both" password="tomcat" roles="tomcat,role1"/>
??????? <user username="probe" password="probe" roles="admin,manager"/>
??????? <user username="role1" password="tomcat" roles="role1"/>
</tomcat-users>
4 设置环境变量,获取服务器状态
# vi /etc/profile
JAVA_OPTS=-Dcom.sun.management.jmxremote
export JAVA_OPTS
5 重启动服务器
6 输入http://localhost/probe/,输入用户名和密码
7 即可进入,这里比较精彩的是对内存的监视,动态显示了JVM的内存图表 ?????????????? maxThreads="150" scheme="https" secure="true"
?????????? keystoreFile="/home/tomcat/.keystore"
????????? keystorePass="password"
??????? truststoreFile="/home/tomcat/.keystore"
?????? truststorePass="password"
???? clientAuth="true" sslProtocol="TLS" />
3.7 客服端安装个人证书和根证书
3.8 访问https://IP:8443出现提示你提交个人证书提示框。成功双向认证!

Linux 操作系统? 修改 tomcat/bin/catalina.sh 文件? 增加? JAVA_OPTS="-Xms256m -Xmx1024m"

webServer tomcat 五 /  tomcat6 / tomcat7

http://localhost:8080/server-status 选择“Server Status”,便可以看到JVM的占用情况

?

?

tomcat7 exception

http://10.21.142.105:8080/sam-web/j_security_check

HTTP Status 408 - The time allowed for the login process has been exceeded. If you wish to continue you must either click back twice and re-click the link you requested or close and re-open your browser
--------------------------------------------
type Status report
message The time allowed for the login process has been exceeded. If you wish to continue you must either click back twice and re-click the link you requested or close and re-open your browser
description The client did not produce a request within the time that the server was prepared to wait (The time allowed for the login process has been exceeded. If you wish to continue you must either click back twice and re-click the link you requested or close and re-open your browser).
--------------------------------------------
Apache Tomcat/7.0.29

end

?


我的异常网推荐解决方案:The server encountered an internal error () that prevented it from fulfilling this request.,http://www.myexception.cn/java-web/317.html

热点排行