windows配置apache tomcat 集群
1,安装包
2,配置apachehttpd---配置的过程中有错误可以查看logs文件夹下的log文件进行排查。
ServerName 192.168.0.102
ServerAlias localhost
ProxyPass / balancer://cluster/ stickysession=JSESSIONID nofailover=On
ProxyPassReverse / balancer://cluster/
ErrorLog "logs/error.log"
CustomLog "logs/access.log" common
3,配置tomcat
4,测试
<%@ page contentType="text/html; charset=GBK"%>
<%@ page import="java.util.*"%>
<html>
<head>
<title>Cluster App Test</title>
</head>
<body>
Server Info:
<%
out.println(request.getLocalAddr() + " : " + request.getLocalPort()+"<br>");%>
<%
out.println("<br> ID " + session.getId()+"<br>");
String dataName = request.getParameter("dataName"); if (dataName != null && dataName.length() > 0) {
String dataValue = request.getParameter("dataValue");
session.setAttribute(dataName, dataValue);
}
out.print("<b>Session 列表</b>"); Enumeration e = session.getAttributeNames();
while (e.hasMoreElements()) {
String name = (String)e.nextElement();
String value = session.getAttribute(name).toString();
out.println( name + " = " + value+"<br>");
System.out.println( name + " = " + value);
}
%>
<form action="test.jsp" method="POST">
名称:<input type=text size=20 name="dataName"> <br> 值:<input
type=text size=20 name="dataValue"> <br> <input
type=submit>
</form>
</body>
</html>
windows配置apache tomcat 集群的更多相关文章
- Apache + Tomcat集群配置详解 (1)
一.软件准备 Apache 2.2 : http://httpd.apache.org/download.cgi,下载msi安装程序,选择no ssl版本 Tomcat 6.0 : http://to ...
- (转)Apache+Tomcat集群配置
本文Apache+Tomcat集群配置 基于最新的Apache和Tomcat,具体是2011年4月20日最新的Tomcat和Apache集群和负载均衡配置. 准备环境 Apache Apache是ht ...
- nginx的简单使用和使用nginx在windows上搭建tomcat集群
nginx是一款轻量级的web服务器,常用的作用为服务器/反向代理服务器以及电子邮件(IMAP/POP3)代理服务器 1.为什么我们要使用Nginx? 反向代理: 反向代理(Reverse Proxy ...
- 实战Apache+Tomcat集群和负载均衡
实战Apache+Tomcat集群和负载均衡 目录 1. 什么是J2EE集群... 3 1.1. 序言... 3 1.2. 基本术语... 3 伸缩性(Scalability): ...
- Apache+tomcat集群配置
一.软件准备 Apache 2.2 : http://httpd.apache.org/download.cgi,下载msi安装程序,选择no ssl版本 Tomcat 6.0 : http://to ...
- Linux+Apache+Tomcat集群配置
参考: http://blog.csdn.net/bluishglc/article/details/6867358# http://andashu.blog.51cto.com/8673810/13 ...
- ngnix apache tomcat集群负载均衡配置
http://w.gdu.me/wiki/Java/tomcat_cluster.html 参考: Tomcat与Apache或Nginx的集群负载均衡设置: http://huangrs.blog. ...
- apache + tomcat 集群
apache2.2与tomcat集成(可以多个tomcat) 需求概况: 有3个服务: localhost:9091, localhost:9190. localhost:9191分别对应3个tomc ...
- Apache + Tomcat集群 + 负载均衡
Part I: 取经处: http://www.ramkitech.com/2012/10/tomcat-clustering-series-simple-load.html http://blog ...
随机推荐
- vc 加载外部资源,释放DLL
#include "stdafx.h"#include "resource.h" #include <Windows.h> #include < ...
- ReverseInteger
public class ReverseInteger { public static int reverse(int x) { long ret = 0; //如果是个位数,直接返回. if(x/1 ...
- @RequestMapping
可以设定访问的目录,与访问的方式 对象可以是类,也可以是方法 @RequestMapping(value = "/say",method = RequestMethod.GET) ...
- phpPgAdmin (win)配置安装及远程访问
phpPgAdmin (win)配置安装 [1] 通过PostgreSQL的Application Stack Builder配置安装phpPgAdmin 1.确保PostgreSQL安装并正 ...
- JavaScrip 原生多文件上传及预览 兼容多浏览器
JavaScrip 原生多文件上传及预览 兼容多浏览器 html代码块 <div class="container"> <label>请选择一个图像文件:& ...
- review34
Thread类与线程的创建 让线程启动时使用我们自己创建run()的两种方式:一种是继承Thread类,实现其中的run()方法,然后用继承的类用无参构造方法创建对象就可以了.第二种是实现Runnab ...
- IIS7配置PHP简要说明
1. IIS7 安装的时候 要注意三个地方打得勾 万维网服务->应用程序开发功能->CGI ->ISAPI扩展 ->ISAPI筛选器 注: CGI 会在IIS7+PHP_ ...
- LeetCode OJ:Length of Last Word(最后一个词的长度)
Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the l ...
- A*B problem(FFT)
#include<iostream> #include<cstdio> #include<cstring> #include<cmath> #inclu ...
- listening 1
It was regrettable that such great issues had to be the thrust and parry of a general election. But ...