这样的链接打开A3为null什么原因?是太长了,还是??
<td><a href="http://localhost:8080/servletquery?type=expykc&step=3&A1=东汽-动力分厂&A2=提花长袖&A3=98.5%棉1.5%涤纶">98.5%棉1.5%涤纶</a>jbuilder2006中,我是第3次调用servletquery这个servlet,前几次取A1,A2都没问题,
在doget方法中执行StrTest=request.getParameter("A3"),结果StrTest总是null

解决方案 »

  1.   

    会不会是编码问题,用URLEncoder.encode()试试<td><a href="<%=URLEncoder.encode("http://localhost:8080/servletquery?type=expykc&step=3&A1=东汽-动力分厂&A2=提花长袖&A3=98.5%棉1.5%涤纶")%>">98.5%棉1.5%涤纶</a>或者用form提交,input传递参数
      

  2.   

    <a href="shoudao.jsp?type=expykc&step=3&A1=东汽-动力分厂&A2=提花长袖&A3=<%=java.net.URLEncoder.encode("98.5%棉1.5%涤纶")%>">98.5%棉1.5%涤纶</a>这样编码后
    在接收的时候  
    String A3= request.getParameter("A3");
    A3=new String(A3.getBytes("iso8859-1"),"gb2312");就不用显示NULL 了建议前面的带有中文的都这样CODE下
      

  3.   

    A3为null 是因为你的带的字符串里面有%符号encode下就可以解决
      

  4.   

    现在是encode()后A3不为null,问题好了一些,但是
    我encode("98.5%棉1.5%涤纶","UTF-8")后不论用decode(","UTF-8"))还是类似new String(A3.getBytes("iso8859-1"),"gb2312");方法,不能正确得到“98.5%棉1.5%涤纶”,只能得到98.5%乱码1.5%乱码,我想是不是%起作用了?因为前面2次传递参数传递的都是中文和英文,不包含%,都能正确传递调用好,这次有了%,不知大家有什么好的方法?
      

  5.   

    A3=new String(A3.getBytes("ISO-8859-1"),"gb2312");写错了 呵呵