首先 要在该系统下配置JSP 我们必须要做的一步就是 先下载对应版本的JDK 和 TOMCAT
这里 以64位WIN7做介绍
在官方网站上下载 最新版本的JDK
JDK 下载地址 http://java.sun.com/javase/downloads/widget/jdk6.jsp
切记 要选择合适的系统环境 我的是WIN7 64位
Platform:
我选择了Window x64
Tomcat 地址: http://tomcat.apache.org/download-60.cgi
我选择了32-bit/64-bit Windows Service Installer (pgp, md5)
安装好JDK 后 在安装Tomcat 其安装目录最好不要带空格和中文 如 D:\Tomcat 就可以了!
安装好后 启动Tomcat 在浏览器上输入 127.0.0.1:8080
点击 Tomcat Manager 输入刚安装时候的用户和密码 进入管理界面
我们先看 Tomcat管理页面的 Server Information 信息栏里的 OS Architecture 信息 我这里是 amd64
然后我们依照信息提示下载 合适的 JK 文件 地址
http://www.apache.org/dist/tomcat/tomcat-connectors/jk/binaries/
我选择 WIN64 / jk-1.2.30/ / amd64 / isapi_redirect-1.2.30.dll 依照 OS Architecture 信息 和系统选择合适的dll
然后我们在来看 http://tomcat.apache.org/connectors-doc/reference/iis.html 的配置说明!
D:\Tomcat 是我的安装目录
到这步 我们先把 下载下来的 isapi_redirect-1.2.30.dll 放入 D:\Tomcat\conf 目录下 并改名为isapi_redirect.dll
创建一个文件isapi_redirect.properties 放在 D:\Tomcat\conf 目录下
其内容如下
# Configuration file for the Jakarta ISAPI Redirector
# The path to the ISAPI Redirector Extension, relative to the website
# This must be in a virtual directory with execute privileges
extension_uri=/jakarta/isapi_redirect.dll
# Full path to the log file for the ISAPI Redirector
log_file=d:\tomcat\logs\isapi_redirect.log
# Log level (debug, info, warn, error or trace)
log_level=info
# Full path to the workers.properties file
worker_file=d:\tomcat\conf\workers.properties
# Full path to the uriworkermap.properties file
worker_mount_file=d:\tomcat\conf\uriworkermap.properties
在创建两个文件
一个为 workers.properties 一个为 uriworkermap.properties
workers.properties 的配置说明 http://tomcat.apache.org/connectors-doc/reference/workers.html
uriworkermap.properties 的配置说明 http://tomcat.apache.org/connectors-doc/reference/uriworkermap.html
我这里的配置
workers.properties
worker.list=worker1
worker.worker1.port=8009
worker.worker1.host=127.0.0.1
worker.worker1.type=ajp13
worker.worker1.lbfactor=1
uriworkermap.properties
/*.jsp=worker1
接下来 就为I配置IIS7了
创建一个用于运行JSP的站点 我这里 就以JSPWEB为例
首先 我在 C:\Windows\System32\drivers\etc\host 中添加一个本地映射 的域名 myjspweb
127.0.0.1 myjspweb
在IIS里新增 站点
网站 右键 -添加网站
接着 我们在改站点下面 新建一个虚拟目录 jakarta
物理路径为:D:\Tomcat\conf
在该虚拟目录的功能视图中选择"处理程序映射"
执行"编辑功能权限",添加"执行"权限
确认列表中的"ISAPI-dll"状态为"启用"
为站点增加ISAPI筛选器:
在站点的功能视图中选择"ISAPI筛选器",执行"添加"
打开站点的ISAPI/CGI限制:
选择IIS根节点中的"ISAPI和CGI限制",执行"添加"
选择目录 允许执行扩展目录
完成 IIS 配置
接下来 就是 给TOMCAT配置站点
打开 D:\Tomcat\conf下的server.xml 文件
Engine 标签内 加入
xmlValidation="false" xmlNamespaceAware="false">
则 该域名则在Tomcat 中绑定了这个 myjspweb 域名
如果 网站是UTF-8 则需要修改这里
改成
最后 重启Tomcat
下载 http://www.softhy.net/down.asp?id=14752&no=1 这个探针 测试 运行正常!