编码问题
jsp+html的编码问题:
<%@ page language="java" contentType="text/html; charset=utf-8" %>
<%@ page language="java"  pageEncoding="utf-8" %>
jsp要使用UTF-8编码,html要使用UTF-8编码,在eclipse可用右键文件——>format修改
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
action中文编码:
因为jsp文件用的是utf-8编码,所以服务器要一致
server.xml
<Connector URIEncoding="UTF-8" port="8080"  protocol="HTTP/1.1"   
               connectionTimeout="20000"     redirectPort="8443" />  
struts.xml: 
<constant name="struts.i18n.encoding" value="UTF-8"></constant>
    stay hungry,stay foolish.
 
                    
                     
                    
                 
                    
                
 
                
            
         
         浙公网安备 33010602011771号
浙公网安备 33010602011771号