Java&J2EE
用过滤器解决getRemoteUser()为的null的问题
2月4日
上次在 解决getRemoteUser()为null的问题中提到从index.jsp中得到<%= request.getRemoteUser() %>。昨天,同事给我提议使用过滤器,于是我在上次的基础上做了修改。
用Debian/Ubuntu提供的软件包整合apache2和tomcat6
1月20日
上篇日志写了用下载源码包的方式整合apache2和tomcat6,或许你会问:怎么不用Debian自己提供的软件包整合呢?
其实在我用下载源码包的方式成功整合apache2和tomcat6后,我就开始实验用Debian自己提供的软件包整合,可是摸索了好长时间,还是整合不成功
。今天在同事蒋鑫的帮助下,终于有了眉目
。下面是具体步骤:
Linux下Apache与Tomcat的整合
1月19日
背景介绍:
Apache的HTTPD是目前比较受欢迎的网站服务器软件,它不但功能强大,而且完全免费,并且支持市场上流行的各种操作系统(Windows,Linux,Mac os)。同时对于Java Servlet/JSP的支持,通常也会使用同样Apache出品的Tomcat。Tomcat除了支持Java Servlet/JSP之外,也可以当做网站服务器使用,但是在对于静态的html文件、图片文件等的解析效率上不如Apache HTTPD的执行效率高。应用tomcat的服务器如果网站的访问量较大,系统资源占用会明显升高。所以就引出Tomcat与apache的整合服务。Apache负责静态资源处理,tomcat负责jsp和java servlet等动态资源的处理。
需要的组件:
1、apache
下载地址:http://httpd.apache.org/download.cgi
2、Tomcat
下载地址:http://tomcat.apache.org/download-60.cgi
3、Apache Tomcat Connector (mod_jk)
下载地址:http://www.apache.org/dist/tomcat/tomcat-connectors/jk/binaries/
根据你的操作系统选择适当的 jk 连接器,同时要注意你用的Apache版本,根据你的Apache版本下载合适的jk版本。
下面是apache与jk的兼容性映射
- mod_jk-1.2.28-httpd-2.2.X.so is for Apache 2.2.x. It has been build against version 2.2.6, but should work with Apache 2.2.0 and later. Rename to mod_jk.so before putting it in your modules directory or adjust your LoadModule statement.
- mod_jk-1.2.28-httpd-2.0.X.so is for Apache 2.0.x. It has been build against version 2.0.61, but should work at least with Apache 2.0.55 and later. Rename to mod_jk.so before putting it in your modules directory or adjust your LoadModule statement.
- mod_jk-1.2.28-httpd-1.3.X-eapi.so is for Apache 1.3.x with EAPI extensions. It has been build against version 1.3.39, but should work at least with Apache 1.3.34 and later. Rename to mod_jk.so before putting it in your modules directory or adjust your LoadModule statement.
Any SSL enabled Apache 1.3 will include the EAPI extensions.
4、如果你的机器上还没有装JRE,那么还需装一个JRE或者JDK包
下面是我在Debian Linux上的整合过程(我的机器上已经安装了JDK)
如果你想用Debian/Ubuntu自己提供的软件包整合tomcat和apache2,可参考 用Debian/Ubuntu提供的软件包整合apache2和tomcat6
阅读全部内容 »

最新评论