你的问题我也碰到过,就是如果没收到上一页的参数,会得到一个"null"的字符串,我的解决方法是:
修改jsp.jar,
可以看到:out.println实现类
org.apache.jasper.runtime.JspWriterImpl中的
println()方法:
    public void print(String s)
        throws IOException
    {
        if(s == null)
            s = "null";
        write(s);
    }
反编译出来,修改为:
    public void print(String s)
        throws IOException
    {
        if(s == null)
            s = "";
        write(s);
    }
就行了只有weblogic中不会有这种问题

解决方案 »

  1.   

    你的问题我也碰到过,就是如果没收到上一页的参数,会得到一个"null"的字符串,我的解决方法是:
    修改jsp.jar,
    可以看到:out.println实现类
    org.apache.jasper.runtime.JspWriterImpl中的
    println()方法:
        public void print(String s)
            throws IOException
        {
            if(s == null)
                s = "null";
            write(s);
        }
    反编译出来,修改为:
        public void print(String s)
            throws IOException
        {
            if(s == null)
                s = "";
            write(s);
        }
    就行了只有weblogic中不会有这种问题
      

  2.   

    if(strValue != null||!strValue.equals(""))
    {
       ......
    }
      

  3.   

    String strValue = request.getParameter("XXX");
    if(strValue!=null&&strValue.equals("")){
      //有值
      //dosomething;
    }else{
      //没有值
      //dosomething;
    }