Category Archives: tomcat

spring-mvc字符编码过滤器 ,service过滤器配置问题

<!– 字符编码过滤器 –>
<filter>
<filter-name>encodingFilter</filter-name>
<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>encodingFilter</filter-name>
<url-pattern>/*</url-pattern><!–这里需要增加一个*号否则过滤不到!–>
</filter-mapping>

tomcat管理者配置

conf/tomcat-users.xml文件配置tomcat的管理者。
其中配置文件中有比较详细的说明了。
—————

<?xml version=’1.0′ encoding=’utf-8′?>
<!–
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the “License”); you may not use this file except in compliance [...]

tomcat(apache-tomcat-7.0.14)session复制

在tomcat的配置文件conf/service。xml中找到
<Engine name=”Catalina” defaultHost=”localhost”  >       
改为
<Engine name=”Catalina” defaultHost=”localhost” jvmRoute=”tomcat2″>
 
下面增加以下内容(可以不用修改)
<Cluster className=”org.apache.catalina.ha.tcp.SimpleTcpCluster”
                 channelSendOptions=”6″>
 
          <Manager className=”org.apache.catalina.ha.session.BackupManager”
                   expireSessionsOnShutdown=”false”
                   notifyListenersOnReplication=”true”
                   mapSendOptions=”6″/>
        [...]