Copy codeThe Code is as follows:
<? Xml version = "1.0" encoding = "UTF-8"?>
<! DOCTYPE html PUBLIC "-// WAPFORUM // dtd xhtml Mobile 1.0 //" http://www.wapforum.org/DTD/xhtml-mobile10.dtd ">
<% @ Page language = "java" contentType = "text/html; charset = UTF-8"
PageEncoding = "UTF-8" %>
<% @ Page import = "java.net. *" %>
<%
String location = "";
String locationFromRequest = request. getParameter ("location ");
If (null! = LocationFromRequest
&&(! LocationFromRequest. equals (""))){
Location = java.net. URLDecoder. decode (locationFromRequest,
UTF-8 ");
}
%>
<Html>
<Head>
<Meta http-equiv = "Content-Type" content = "text/html; charset = UTF-8"/>
</Head>
Xxxxxxxxxxxxxxxxx <% = new String (location. getBytes ("iso-8859-1"), "UTF-8") %>
<Br/>
<A href = "1234.jsp? Location = <% = java.net. URLEncoder. encode ("Wangjing", "UTF-8") %> "> Wangjing </a>
</Html>