Chinese Code Question
1 Add filter setcharacterencodingfilter to Web.XML, solve POST
2 In Server.XML 3 Plus <% @ Page ContentType = "Text / HTML; Charset = GBK"%> <% @ page contentty = "text / html; charset = GBK"%> <% @ Page ContentType = "Text / HTML; Charset = GBK "%> <% @ Page ContentType =" text / html; charset = GBK "%> 4 If the database uses mysql, the connected URL is written here: JDBC: mysql: // localhost: 3306 / databaseName? Useunicode = true & characterencoding = UTF-8, of course, if you are written in the XML file, you want to use the shield . Such as: Work with apache (2.0.49) JDK1.4 environment, Apache and Tomcat installation procedures are omitted. As shown in the following, the installation path of Apache2 is apache_home, Tomcat5 is Tomcat_Home 1. Close two services, copy the mod_jk2.so to apache_home / modules / 2. Modify the configuration file apache_home / conf / httpd.conf, plus the following line loadModule JK2_Module Modules / MOD_JK2.SO3. In Apache_Home / Conf / Under, establish Property file workers2.properties content is [SHM] file = $ {serverRoot} /logs/shm.file size = 1048576 #the socket channel: localhost: 8009] Port = 8009 host = 127.0.0.1 #define the worker [AJP13: localhost: 8009] Channel = Channel. Socket: localhost: 8009 #uri mapping [URI: / *. jsp] [URI: / *. do] worker = ajp13: localhost: 8009 4. Modify Tomcat_Home / Conf / JK2 .properties, add the following handler.list = apr, request, channeljni channel.jnimodeso = 8009 apr.jnimodeso = apache_home / modules / mod_jk2.so 5. At this time, it is best to restart the machine, there are two points to pay attention, first, If the home page is a JSP file, it is necessary to specifically configure it. This line of DirectoryIndex index.html index.html.var is added after httpd.conf. Second, the root path is best to be unified, or modify the Tomcat server.xml, modify httpd.conf, JSP-related pictures, JS, etc. can not be found due to the relative path. For example, add a virtual directory to Server.xml: