您的位置:首页 > 编程语言 > Java开发

关于The function get must be used with a prefix when a default namespace is not specified的错误

2015-12-02 14:28 721 查看
最近在做一个项目的时候,碰到了一个问题

  org.apache.jasper.JasperException: /WEB-INFiews/modulesscheduling/revenueStatistics.jsp(94,6) PWC6296: 
The function get must be used with a prefix when a default namespace is not specified 

     提示 发生错误的代码如下:

   <c:forEach items="${sts.headList}" var="headName" varStatus="index">

      <c:if test="${sts.columnSumList.get(index.index) gt 0}">

         <th>${headName}</th>

     </c:if>

 </c:forEach> 

代码我是从svn上更新下来的,开始的时候还以为是别人少提交了文件,后来沟通之后说没少提交文件,在他的电脑上没问题,可是在我的电脑上就出问题了,这是为什么呢?
检查了下代码,可是都没有什么问题,看了半天也没找到原因,后来把${sts.columnSumList.get(index.index) gt 0}  换成 ${sts.columnSumList.get[index.index] gt 0}就不报上述的错误了。
这次终于找到了原因,是因为我使用的jdk版本是jdk1.7.0_13,版本太低了,无法识别${sts.columnSumList.get(index.index)}这种方式的写法

把jdk版本升级为jdk1.7.0_80版本就可以解决上诉问题了
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  java