apache+tomcat整合运行jsp出现以下错误: 如何解决?谢谢
An error occurred at line: -1 in the jsp file: null Generated servlet error: [javac] Compiling 1 source file Date: Tue, 02 Dec 2003 02:09:25 GMT Server: Apache/2.0.47 (Win32) mod_jk/1.2.4 Cache-Control: no-store Pragma: no-cache Connection: close Transfer-Encoding: chunked Content-Type: text/html; charset=gb2312 Content-Language: ja 14b2 问题点数:20、回复次数:4Top
1 楼lhbf(牧野)回复于 2003-12-02 17:18:56 得分 1
按照我介绍的方法重新整合试试看:
http://expert.csdn.net/Expert/topic/2512/2512850.xml?temp=.7617761Top
2 楼ustcfrank(勇敢的心)回复于 2003-12-02 17:32:43 得分 18
Apache/2.0.47 (Win32) 加载模块要用mod_jk2,不能用mod_jk
http://expert.csdn.net/Expert/topic/2509/2509343.xml?temp=.4163019
原因如下:
是apache加载的模块不对
----------
1.
从
http://www.apache.org/dist/jakarta/tomcat-connectors/jk2/binaries/win32/
下载
jakarta-tomcat-connectors-jk2.0.2-win32-apache2.0.43.zip
解压缩后,把mod_jk2-2.0.43.dll复制到C:\Apache2\modules子目录下
2.httpd.conf
屏蔽相应代码
# Using mod_jk2.dll to redirect dynamic calls to Tomcat
#LoadModule jk_module modules/mod_jk_1.2.5_2.0.47.dll
#JkWorkersFile "C:/Tomcat/conf/workers.properties"
#JkLogFile "C:/Tomcat/logs/mod_jk2.log"
#JkLogLevel info
#JkMount /servlet/* ajp13
#JkMount /*.jsp ajp13
再加入一行代码
LoadModule jk2_module modules/mod_jk2-2.0.43.dll
3.
在C:\Apache2\conf目录下新建一个文件,一定命名为workers2.properties。 workers2.properties内容如下:
[shm]
file=${serverRoot}/logs/shm.file
size=1048576
# Example socket channel, override port and host.
[channel.socket:localhost:8009]
port=8009
host=127.0.0.1
# define the worker
[ajp13:localhost:8009]
channel=channel.socket:localhost:8009
# Uri mapping
[uri:/*]
worker=ajp13:localhost:8009
4.(这步你可能做过了)
把documentroot改为
tomcat5.0/webapps/root
5.重启apache,再重启tomcat
在IE中
http://localhost:80/index.jsp
里面的功能就该都能用了
----------------
相关帖子:
http://expert.csdn.net/Expert/FAQ/FAQ_Index.asp?id=152944Top
3 楼wchunge(山子)回复于 2003-12-03 17:17:14 得分 0
谢谢你的解答,但我看了mod_jk2-2.0.43.dll 只适合 apache 2.0.43版本不适合apache 2.0.47版本
mod_jk2-2.0.43.dll is for Apache 2.0.43 (and only 2.0.43)Top
4 楼ustcfrank(勇敢的心)回复于 2003-12-03 22:28:26 得分 1
也适合apache 2.0.47
可以的,没问题,你试一下Top




