首页 > 代码库 > 解决org.apache.jasper.JasperException: The following has evaluated to null or missing异常总结

解决org.apache.jasper.JasperException: The following has evaluated to null or missing异常总结

bug图示:

        技术分享

说明:做struts2的标签回显时出现的bug,百度上有人说是引用到空的对象的bug,最后仔细发现是标签内容写错了

        <td><s:radio list="{‘男‘,‘女‘}" value="gender"></s:radio> </td>

             list:表示从这个集合中取值.

            gender:表示从值栈从获取的对象属性

解决:

      正确的格式:  <td><s:radio list="{‘男‘,‘女‘}" name="gender"></s:radio> </td>

      这里我把name鬼使神差的写成了value,这种容易忽略的错误让捉急啊

    

解决org.apache.jasper.JasperException: The following has evaluated to null or missing异常总结