- 浏览: 140417 次
- 性别:
- 来自: 成都
文章分类
最新评论
-
jonesmillera:
Good article! Thank you for sha ...
好用的dao(spring+jpa) -
Luob.:
里面一个类都没有,有反应才怪呢
多文件上传组件SWFUpload java环境小例子 -
seaie:
谢谢博主的分享。
下载测试了下,跑起来ok,不过有3个可改进 ...
java图片压缩处理 支持gif -
angangJonny:
没法反应怎么解决的啊!
多文件上传组件SWFUpload java环境小例子 -
nookiehuihui:
点上传没反应,什么情况
多文件上传组件SWFUpload java环境小例子
在我们部署Web应用时,不可避免大多都会涉及到集群问题,此文作为Apache 2.2.x+Tomcat6配置集群的备忘。
- 配置Tomcat6 的conf\server.xml文件,启用集群设置,如果在本地同时运行多个Tomcat进行测试的话,需要修改部分端口号,以避免冲突
- 打开AJP:<Connector port="9009" protocol="AJP/1.3" redirectPort="9443" />
- 打开集群:
- <Engine name="Standalone" defaultHost="localhost" jvmRoute="jvm2">
- <!--For clustering, please take a look at documentation at:
- /docs/cluster-howto.html (simple how to)
- /docs/config/cluster.html (reference documentation) -->
- <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster" channelSendOptions="6">
- <Manager className="org.apache.catalina.ha.session.BackupManager"
- expireSessionsOnShutdown="false"
- notifyListenersOnReplication="true"
- mapSendOptions="6"/>
- <!--
- <Manager className="org.apache.catalina.ha.session.DeltaManager"
- expireSessionsOnShutdown="false"
- notifyListenersOnReplication="true"/>
- -->
- <Channel className="org.apache.catalina.tribes.group.GroupChannel">
- <Membership className="org.apache.catalina.tribes.membership.McastService"
- address="228.0.0.4"
- port="45564"
- frequency="500"
- dropTime="3000"/>
- <Receiver className="org.apache.catalina.tribes.transport.nio.NioReceiver"
- address="auto"
- port="5001"
- selectorTimeout="100"
- maxThreads="6"/>
- <Sender className="org.apache.catalina.tribes.transport.ReplicationTransmitter">
- <Transport className="org.apache.catalina.tribes.transport.nio.PooledParallelSender"/>
- </Sender>
- <Interceptor className="org.apache.catalina.tribes.group.interceptors.TcpFailureDetector"/>
- <Interceptor className="org.apache.catalina.tribes.group.interceptors.MessageDispatch15Interceptor"/>
- <Interceptor className="org.apache.catalina.tribes.group.interceptors.ThroughputInterceptor"/>
- </Channel>
- <Valve className="org.apache.catalina.ha.tcp.ReplicationValve"
- filter=".*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\.css;.*\.txt;"/>
- <Deployer className="org.apache.catalina.ha.deploy.FarmWarDeployer"
- tempDir="/tmp/war-temp/"
- deployDir="/tmp/war-deploy/"
- watchDir="/tmp/war-listen/"
- watchEnabled="false"/>
- <ClusterListener className="org.apache.catalina.ha.session.ClusterSessionListener"/>
- </Cluster>
- <!-- The request dumper valve dumps useful debugging information about
- the request and response data received and sent by Tomcat.
- Documentation at: /docs/config/valve.html -->
- <!--
- <Valve className="org.apache.catalina.valves.RequestDumperValve"/>
- -->
- <!-- This Realm uses the UserDatabase configured in the global JNDI
- resources under the key "UserDatabase". Any edits
- that are performed against this UserDatabase are immediately
- available for use by the Realm. -->
- <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
- resourceName="UserDatabase"/>
- <!-- Define the default virtual host
- Note: XML Schema validation will not work with Xerces 2.2.
- -->
- <Host name="localhost" appBase="webapps"
- unpackWARs="true" autoDeploy="true"
- xmlValidation="false" xmlNamespaceAware="false">
- <!-- SingleSignOn valve, share authentication between web applications
- Documentation at: /docs/config/valve.html -->
- <!--
- <Valve className="org.apache.catalina.authenticator.SingleSignOn" />
- -->
- <!-- Access log processes all example.
- Documentation at: /docs/config/valve.html -->
- <!--
- <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
- prefix="localhost_access_log." suffix=".txt" pattern="common" resolveHosts="false"/>
- -->
- </Host>
- </Engine>
<Engine name="Standalone" defaultHost="localhost" jvmRoute="jvm2"> <!--For clustering, please take a look at documentation at: /docs/cluster-howto.html (simple how to) /docs/config/cluster.html (reference documentation) --> <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster" channelSendOptions="6"> <Manager className="org.apache.catalina.ha.session.BackupManager" expireSessionsOnShutdown="false" notifyListenersOnReplication="true" mapSendOptions="6"/> <!-- <Manager className="org.apache.catalina.ha.session.DeltaManager" expireSessionsOnShutdown="false" notifyListenersOnReplication="true"/> --> <Channel className="org.apache.catalina.tribes.group.GroupChannel"> <Membership className="org.apache.catalina.tribes.membership.McastService" address="228.0.0.4" port="45564" frequency="500" dropTime="3000"/> <Receiver className="org.apache.catalina.tribes.transport.nio.NioReceiver" address="auto" port="5001" selectorTimeout="100" maxThreads="6"/> <Sender className="org.apache.catalina.tribes.transport.ReplicationTransmitter"> <Transport className="org.apache.catalina.tribes.transport.nio.PooledParallelSender"/> </Sender> <Interceptor className="org.apache.catalina.tribes.group.interceptors.TcpFailureDetector"/> <Interceptor className="org.apache.catalina.tribes.group.interceptors.MessageDispatch15Interceptor"/> <Interceptor className="org.apache.catalina.tribes.group.interceptors.ThroughputInterceptor"/> </Channel> <Valve className="org.apache.catalina.ha.tcp.ReplicationValve" filter=".*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\.css;.*\.txt;"/> <Deployer className="org.apache.catalina.ha.deploy.FarmWarDeployer" tempDir="/tmp/war-temp/" deployDir="/tmp/war-deploy/" watchDir="/tmp/war-listen/" watchEnabled="false"/> <ClusterListener className="org.apache.catalina.ha.session.ClusterSessionListener"/> </Cluster> <!-- The request dumper valve dumps useful debugging information about the request and response data received and sent by Tomcat. Documentation at: /docs/config/valve.html --> <!-- <Valve className="org.apache.catalina.valves.RequestDumperValve"/> --> <!-- This Realm uses the UserDatabase configured in the global JNDI resources under the key "UserDatabase". Any edits that are performed against this UserDatabase are immediately available for use by the Realm. --> <Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase"/> <!-- Define the default virtual host Note: XML Schema validation will not work with Xerces 2.2. --> <Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false"> <!-- SingleSignOn valve, share authentication between web applications Documentation at: /docs/config/valve.html --> <!-- <Valve className="org.apache.catalina.authenticator.SingleSignOn" /> --> <!-- Access log processes all example. Documentation at: /docs/config/valve.html --> <!-- <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" prefix="localhost_access_log." suffix=".txt" pattern="common" resolveHosts="false"/> --> </Host> </Engine>
2.打开Apache下的conf\httpd.conf文件,打开注释:
- LoadModule proxy_module modules/mod_proxy.so
- LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
- LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
- LoadModule proxy_connect_module modules/mod_proxy_connect.so
- LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
- LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_module modules/mod_proxy.so LoadModule proxy_ajp_module modules/mod_proxy_ajp.so LoadModule proxy_balancer_module modules/mod_proxy_balancer.so LoadModule proxy_connect_module modules/mod_proxy_connect.so LoadModule proxy_ftp_module modules/mod_proxy_ftp.so LoadModule proxy_http_module modules/mod_proxy_http.so
在文件末尾添加:
- ProxyRequests Off
- <Proxy balancer://cluster>
- BalancerMember ajp://localhost:8009 loadfactor=1 route=jvm1
- BalancerMember ajp://localhost:9009 loadfactor=1 route=jvm2
- </Proxy>
ProxyRequests Off <Proxy balancer://cluster> BalancerMember ajp://localhost:8009 loadfactor=1 route=jvm1 BalancerMember ajp://localhost:9009 loadfactor=1 route=jvm2 </Proxy>
配置VirtualHost:
- <VirtualHost *:80>
- ServerAdmin test@126.com
- ProxyPass / balancer://cluster/ stickysession=jsessionid nofailover=On
- ProxyPassReverse / balancer://cluster/
- ServerName www.mytest.com
- ServerAlias mytest.com
- </VirtualHost>
<VirtualHost *:80> ServerAdmin test@126.com ProxyPass / balancer://cluster/ stickysession=jsessionid nofailover=On ProxyPassReverse / balancer://cluster/ ServerName www.mytest.com ServerAlias mytest.com </VirtualHost>
在应用程序的web.xml结尾加入:
发表评论
-
java web 文件文件上传
2009-12-10 12:29 12960今日学习的主要内容是——文件的上传与下载,下载我们在之前的学 ... -
中文句子相似度判断源码探讨
2009-11-04 15:59 2927在我们日常的开发中, ... -
通用各类文档读写的设计与实现
2009-11-04 15:35 1032在我们日常的项目开发中,经常碰到需要读取word等文档的需求, ... -
抓取百度Top500歌曲以及地址源码
2009-11-04 15:33 1499在我整理完在线听歌(http://ting.faqee.c ... -
多文件上传组件SWFUpload java环境小例子
2009-10-16 14:16 6563包结构如下: index.jsp upload.jsp ... -
工具类
2009-07-23 17:42 1216import java.util.HashMap; impo ... -
好用的dao(spring+jpa)
2009-07-23 09:05 2514package com.itcast.service.base ... -
spring+JPA的注解(自己使用)
2009-06-10 00:48 1547依赖注入的手工装配的两种方式注解 @Resource 一般 ... -
spring的优缺点
2009-06-08 10:06 3178它是一个开源的项目,而且目前非常活跃;它基于IoC(Inver ... -
Struts优缺点
2009-06-08 09:51 1490跟Tomcat、Turbine等诸多Apa ... -
struts1与struts2的比较
2009-06-08 09:33 951特性 Struts 1 ... -
struts2+hibernate+spring分页方法
2009-05-27 13:16 3428import java.util.List; ... -
struts2+spring2+hibernate3.1应用实例
2009-05-22 18:24 12751. 组合Hibernate 与Spring ...
相关推荐
Linux下安装配置 Apache2.2.x+MySql5.x+PHP5.x 详解
本资源为小夜的传说Apache2.2.x+Tomcat6.x+jk2.x做集群配置源码!
mod_jk(包含apache2.4.x和apache2.2.x的两种版本)
apache2.2 + tomcat6 整合以及集群配置
apache2.2+tomcat6在windows下的集群配置
这些资源是配合apache(2.2.x)+openssl(0.9.6->1.0.1升级)过程博文环境搭建中所需要的资源,不是太好找,所以都传上来,主要有: 1.升级opensslV1.0.1b单独用到的三个文件:libeay32.dll,openssl.exe,ssleay32.dll ...
NULL 博文链接:https://weir2009.iteye.com/blog/2063322
Apache2.2+Tomcat5.5整合配置教程 Apache2.2.4 http://archive.apache.org/dist/httpd/binaries/win32/ Tomcat5.5.26 http://tomcat.apache.org/download-55.cgi jk.1.2.6.so ...
直接下载, 即可用 apache2.4+tomcat 7 集群配置
Windows下安装Apache2.2.x
windows下Apache2.2.9+Subversion1.5.5(for Apache2.2.X)的配置与权限设置,来源于网络
mod_python-3.3.1.win32-py2.5-Apache2.2.exe
Apache2.2+Tomcat5.5或5.0 集群配置文档
本资源包含了文章Apache2.2.x + Tomcat6.x + JK 集群配置,http://blog.csdn.net/qq396229783/article/details/74295797里面所用到的软件配置
mod_jk-1.2.23-apache-2.2.x-linux-i686
apache python mod_python 插件 更多到我的站点: http://www.iteedu.com/download
Apache2负载均衡+Tomcat6集群,用于tomcat的集群配置详细解说
Apache2.2.chm.rar Apache2.2.chm.rar
mod_jk for apache 2.2.x
Windows下apache2.2+php+mysql安装及配置全攻略.pdf