?????????? Java web???????????????

????1??html???????

??????web????У??????????????http header: Content-type?????????????encoding?? ????????Content-Type: text/html; charset=UTF-8?? ???????UTF-8?????????????????html?????????????html???浽??????? ???????html????????meta????????????????????default?????????????????????????

????Meta???

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>

????2??HttpRequest?????

????????????????????????????????????????????????????????????????????????filter?????request.setCharacterEncoding("UTF-8")?????????.??????????????????ISO-8859-1?????????????????????????????????????

????3??httpresponse?????

????httpresponse?п??????????????????????????????????response.setCharacterEncoding("UTF-8")??response.setContentType("text/html;charset=UTF-8")??????????????????????????response.setCharacterEncoding("UTF-8")?????response.setContentType("text/html;charset=UTF-8")?????????MIME?????????????????????????????????????????JSP??治????????????????JSP??????????????????????????????????????

????4??JSP???????

????????????????????????е??????????????????????Ч??????????????????е?????????????????

??????????????????1)??2)???????????????????????include??????JSP??????<%@includefile="BB.jsp"%>??<jsp:includepage="BB.jsp"/>????????????AA.jsp???????????includeBB.jsp?????BB.jsp?в????????????????????Ч????AA.jsp??BB.jsp?????AA.jsp???????????????б???

???????????ú????include?????????AA.jsp??BB.jsp?ж??????и?????????????

????1??<%@pagecontentType="text/html;charset=UTF-8"%>

????2??<%@pagepageEncoding="charset=UTF-8"%>

????3????web.xml?????????????

<jsp-config>

<jsp-property-group>
<url-pattern>*.jsp</url-pattern>

<page-encoding>UTF-8</page-encoding>
</jsp-property-group>

</jsp-config>
 
????5??web.xml??weblogic.xml?е?mime??????

??????web.xml?п??????mime????????????????????????????????????????????????3???????http response.setContentType??response.setCharacterEncoding?????????????磺

<mime-mapping>

<extension>html</extension>

<mime-type>text/html; charset=UTF-8</mime-type>

</mime-mapping>
 
??????weblogic.xml?п???????????mime????????????

<container-discriptor>

<default-mime-type>text/html; charset=UTF-8</default-mime-type>

</container-discriptor>
 
????????

<charset-params>

<input-charset>

<resource-path>/*</resource-path>

<java-charset-name>UTF-8</java-charset-name>

</input-charset>

</charset-params>
 
????????????????????html?? http request?? http response ??jsp pages?к????????????????????????????????UTF-8???????????????????????mime mapping?????ú?????web.xml?????á?weblogic?е?????????????????????????????????????????????????????