jsp 난 코드 처리

1. jsp       
	     jsp            ,    UTF-8 
	    ,   jsp     ,  <%@ pageEncoding="utf-8"%>
	             
2.    Servlet      
	       Servlet,Servlet              
	 Servlet  response       ,   response.setContentType		("text/html;charset=utf-8"),           UTF-8.
3. post        
	  jsp  ,HTML,    Servlet              jsp	    Servlet, jsp    Servlet          
	   POST       ,  resquest.setCharacterEncoding("UTF-8")           UTF-8  
	              
4. URI        
	  tomcat\conf\server.xml   
	 <Connector port="8080" protocol="HTTP/1.1" 
               connectionTimeout="20000" 
               redirectPort="8443"/>

	 <Connector port="8080" protocol="HTTP/1.1" 
               connectionTimeout="20000" 
               redirectPort="8443" URIEncoding="UTF-8"/>


ajax  POST   SERVLET   ,       
1、 JS        :
encodeURI(encodeURI(title))
2、 Java     :
String title=request.getParameter("title");
title=URLDecoder.decode(title,"UTF-8"); 

href=".. arch arch.do?method=gongsiku&area=<%=URLEncoder.encode("  ", "utf-8")%>" 

좋은 웹페이지 즐겨찾기