httpd.conf 在相应地方如下设置: LanguagePriority ja en ca cs da de el eo es et fr he hr it ko ltz nl nn no pl pt pt-BR ru sv zh-CN zh-TW AddDefaultCharset GB2312
To bdsc():在 #uri mapping [uri:/*.jsp] worker=ajp13:localhost:8009处动动脑子是的,我原以为也是这一块好象少了点什么, 应该少了指定执行servlet的语句,我曾经试着将workers2.properties写成如下形式: [shm] file=${serverRoot}/logs/shm.file size=1048576 # socket channel [channel.socket:localhost:8009] port=8009 host=127.0.0.1 # worker for the connector [ajp13:localhost:8009] channel=channel.socket:localhost:8009 [uri:/jsp-examples/*] [uri:/tomcat-docs/*] 但也不好用,请指点!!!!!
#uri mapping
[uri:/*.jsp]
worker=ajp13:localhost:8009处动动脑子
在相应地方如下设置:
LanguagePriority ja en ca cs da de el eo es et fr he hr it ko ltz nl nn no pl pt
pt-BR ru sv zh-CN zh-TW
AddDefaultCharset GB2312
#uri mapping
[uri:/*.jsp]
worker=ajp13:localhost:8009处动动脑子是的,我原以为也是这一块好象少了点什么,
应该少了指定执行servlet的语句,我曾经试着将workers2.properties写成如下形式:
[shm]
file=${serverRoot}/logs/shm.file
size=1048576
# socket channel
[channel.socket:localhost:8009]
port=8009
host=127.0.0.1
# worker for the connector
[ajp13:localhost:8009]
channel=channel.socket:localhost:8009
[uri:/jsp-examples/*]
[uri:/tomcat-docs/*]
但也不好用,请指点!!!!!
[uri:/lhnet/*]
则所有对/lhnet/*的请求,apache都会转给tomcat处理,不管是html,jsp或其他
添加
[uri:/lhnet/*]
后,果然可以运行了,是不是如果我做N个虚拟目录,就得添加N条这样的记录啊还有就是中文问题没有解决,还得请帮帮忙,
一般我的程序头加<%@ page contentType="text/html;charset=gb2312"%>就解决问题,
但是数据库中的中文,
tt = new String(rs.getString(1).getBytes("ISO-8859-1"));这是我原来的方法(原来只有tomcat做服务器,而现在是apache+tomcat做服务器)
tt = new String(rs.getString(1).getBytes("gb2312"));改成这样以后就可以了,
实际上我想在apache中加入AddDefaultCharset GB2312就可以了,上面我所做的只不过是画蛇添足而已。
对/lhnet/*的请求,apache都会转给tomcat处理,不管是html,jsp或其他
----------------
请问,这样的话整合apache和Tomcat还有什么意义?
原来Tomcat能做的为什么要通过apache作为中转?
那不浪费资源了吗?本来整合apache是为了减轻tomcat处理html的负担,现在等于增加了tomcat的响应时间!