2013年10月30日星期三

In the jsp -value to struts1.3 when garbled how to solve ?

tomcat has modified the code :
<Connector port="80" protocol="HTTP/1.1"
               connectionTimeout="20000" URIEncoding="UTF-8"
               redirectPort="8443" />
    <!-- A "Connector" using the shared thread pool-->
    <!--

project added a filter :
@Override
public void doFilter(ServletRequest request, ServletResponse response,
FilterChain chain) throws IOException, ServletException {
request.setCharacterEncoding("UTF-8");
response.setCharacterEncoding("UTF-8");

chain.doFilter(request, response);
}

jsp page is UTF-8 format , but still garbled, how to solve ?
------ Solution ---------------------------------------- ----

+1
------ Solution --------------------------- -----------------
garbled : page character encoding , the project set the character encoding , Tomcat garbled, database garbled. these few . are unified under !
------ For reference only -------------------------------------- -
response.setContentType ("text / html; charset = utf-8");
------ For reference only ------------ ---------------------------


not, or garbled. .
prompt box :

jsp page :
------ For reference only ----- ----------------------------------

+1  
+10086 still garbled. . Seeking solutions
------ For reference only ---------------------------------------
you are from jsp to action garbled way with withheld
action to jsp with the following

URLEncoder.encode("显示内容", "UTF-8")

There tomcat server.xml in the conf under the Connector tab plus URIEncoding = "UTF-8"
------ For reference only --------- ------------------------------

+1          
+10086 still garbled. . Seeking solutions     
" in the jsp -value to " What are you mislead people do
------ For reference only ------------------- --------------------

+1                
+10086 still garbled. . Seeking solutions               
" in the jsp -value to " What are you mislead people do  

There is a page in the jsp Submit to submit
------ For reference only -------------------------- -------------

+1                      
+10086 still garbled. . Seeking solutions                       
" in the jsp -value to " What are you mislead people do          
  
There is a page in the jsp Submit to submit  

There is a page in the jsp Submit to submit , submit the data in the database is garbled
------ For reference only ---------------- -----------------------

+1                            
+10086 still garbled. . Seeking solutions                               
" in the jsp -value to " What are you mislead people do                
    
There is a page in the jsp Submit to submit          
  
There is a page in the jsp Submit to submit , submit the data in the database is garbled  
on the 5th floor to give you answers
------ For reference only --------------------------- ------------

ah , I have resolved, in the web.xml to add filters. .

没有评论:

发表评论