jsp get方法乱码问题

<form action="encoding.jsp" method="post" name="get" >
<input type="hidden" name="luanma1" value="<%//out.print(URLEncoder.encode("中国","ISO-8859-1"));%>"/>
<input type="hidden" name="luanma" value="中国"/>
<input type="submit" name="tijioa" value="tijiao" />
<%
 

String luanma=request.getParameter("luanma");

if(null !=luanma){
 out.println("没有解码:"+luanma);
 
 String ns=new String(luanma.getBytes("ISO-8859-1"),"GBK"); 
 out.println("解码:"+ns);
 System.out.println(ns);

}


%>

你可能感兴趣的:(jsp)