转码:a.href=./showcont.jsp?tcontent=+encodeuri(encodeuri(tcontent));
解码:java.net.urldecoder.decode((string)request.getparameter(tcontent), utf-8);
例:
a.jsp源代码
代码如下:
<%@ page contenttype=text/html; charset=gb2312 language=java import=java.sql.* errorpage= %>
String name = new String(request.getParameter("username").getBytes("ISO-8859-1"),"UTF-8");