---
title: "attribute test does not accept any expressions"
author: "Inmethetiger"
date: "2013-03-13T15:40:27Z"
tags: ["jsp jstl"]
categories: ["Web前端"]
slug: "attribute-test-does-not-accept-any-expressions"
draft: false
lastmod: "2013-03-13T15:40:27Z"
id: 1828762
url: "https://inmethetiger.iteye.com/blog/1828762"
---

使用jstl标签，发现老是出现

attribute test does not accept any expressions的错误。看代码，没问题。后来查了一下，解决方案是：

将

&lt;%@taglib prefix="c" uri="http://java.sun.com/jstl/core"%&gt;

改为：

 

&lt;%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%&gt;

试了一下，果然可以了。

原因，应该是jstl1.0和jstl2.0的区别吧！

自己没深究，有时间可以看看。这两个uri有何区别！