Apache2+Tomcat6+MOD_JK集群
摘要: o run session replication in your Tomcat 6.0 container, the following steps should be completed:
All your session attributes must implement java.io.Serializable
Uncomment the Cluster element in server.xml
If you have defined custom cluster valves, make sure you have the ReplicationValve defined as well under the Cluster element in server.xml
If your Tomcat instances are running on the same machine, make sure the tcpListenPort attribute is unique for each inst
閱讀全文
config.getServletContext().getRealPath("/")返回NULL的解決辦法
摘要: java.net.URL url = this.getClass().getResource("/");
String mSchemaPath = url.getFile();
if (mSchemaPath != null || !mSchemaPath.equals("")) {
String separator = "/";
int lastSlash = mSchemaPath.lastIndexOf(separator);
if (lastSlash == -1) {
separator = "\\";
lastSlash = mSchemaPath.lastIndexOf(separator);
}
prefix = mSchemaPath.substring(0, lastSlash);
閱讀全文
eclipse項(xiàng)目發(fā)布webapps
摘要: 1:找到 server 面板,右擊當(dāng)前的那個(gè) tomcat,先 remove 掉其中所有的工程
2:再右擊那個(gè) tomcat,選擇 clean... 清空一下
3:雙擊那個(gè) tomcat,會(huì)打開(kāi)屬性面板,找到左邊第二個(gè) server locations,你那個(gè)單選框選中的應(yīng)該是第一個(gè),你選擇第三個(gè),在 server path 中輸入你想要的路徑后,保存即可以了
閱讀全文
Apache + Tomcat 負(fù)載均衡及Session綁定的實(shí)現(xiàn)(轉(zhuǎn))
摘要: 本測(cè)試使用的軟體下載地址:
http://archive.apache.org/dist/tomcat/tomcat-connectors/jk/binaries/win32/jk-1.2.15/
http://archive.apache.org/dist/httpd/binaries/win32/
閱讀全文