According to TLD or attribute directive in tag file, attribute value does not accept any expressions
在运用标准标签库和EL表达式写JSP页面的时候,有时候会报500错误
执行某jsp页面时,弹出如标题所示异常,jsp代码如下:
<%@ page language="java" contentType="text/html;charset=gbk" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
</head>
<body>
This is the result:
<c:out value="${userInfo}" default="没有结果"/>
</body>
</html>
异常的原因是不能识别“${userInfo}”,解决办法有两种:
一、在page指令里,加入isELIgnored="true"属性,即
<%@ page language="java" contentType="text/html;charset=gbk" isELIgnored="true" %>
二、把<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>变为:
<%@ taglib prefix="c" uri=http://java.sun.com/jstl/core_rt %>
经过改动之后,jsp页面能正常执行了。
转载于:https://www.cnblogs.com/yuanlaihenkuang/p/7348450.html
According to TLD or attribute directive in tag file, attribute value does not accept any expressions相关推荐
- jstl错误:According to TLD or attribute directive in tag file, attribute value does not accept any expr
JSP 页面中使用 JSTL 标签库,访问 JSP 页面时抛出了如下异常信息: org.apache.jasper.JasperException: /index.jsp (line: 261, co ...
- 【问题解决】使用fmt格式化时间出现According to TLD or attribute directive in tag file, attribute value does not acce
解决办法: 将标签: <%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %> 改 ...
- El表达式“attribute items does not accept any expressions”
El表达式"attribute items does not accept any expressions" 正常该导入: <%@ taglib prefix="c ...
- 关于调用 Angular 属性指令 attribute Directive 是否需要带中括号的问题
属性型指令,应用在宿主元素时不需要中括号: 效果如下图黄色高亮区域所示: 从外界传值给 Angular attribute Directive: 这里需要给 highlight Directive 创 ...
- Unity报错之【Tag provider attribute authorities has invalid character '$'.】
在做unity调用安卓安装apk原生接口的时候,需要在AndroidManifest.xml里面配置Provider标签,标签属性用到了 ${applicationId} 这个值,在unity打包时报 ...
- .Net Attribute详解(下) - 使用Attribute武装枚举类型
接上文.Net Attribute详解(上)-Attribute本质以及一个简单示例,这篇文章介绍一个非常实用的例子,相信你一定能够用到你正在开发的项目中.枚举类型被常常用到项目中,如果要使用枚举To ...
- java文件批量重命名文件,文件批量工具(File Attribute Changer)
文件批量工具(File Attribute Changer)是一款对文件属性批量修改,以及对文件批量重命名的工具,所 谓的文件属性是指隐藏属性,在查看磁盘文件的名称时,系统一般不会显示具有隐藏属性的文 ...
- Error:(54) Tag uses-permission attribute name has invalid character '-'.
无意中在清单文件里加了- 发现后重新build,clear都不好使,无奈下删除了build文件后重新编译就好了,感觉很奇葩,记下来纪念下
- attribute java c_属性别名(Attribute Aliasing)
属性别名(Attribute Aliasing) 属性别名用于将成员变量序列化为XML属性. 让我们再次修改我们的示例并将以下代码添加到其中.xstream.useAttributeFor(Stude ...
最新文章
- vue-cli 使用小技巧
- Redis 的性能幻想与残酷现实(转)
- 无责任Windows Azure SDK .NET开发入门(二):使用Azure AD 进行身份验证
- JAVA 创建线程池
- Latex安装中知道的基础常识
- 机器学习中常见的损失函数
- Direct交换器-编写生产者
- 深入分析 Java 方法反射的实现原理
- Android中调用webservice的工具类
- Base64---加密
- axios的http拦截
- 电脑怎么打出冒号符号_标点符号的用法,资深老师带你学习,提高学生学习效率...
- 【java与智能设备】CH07_01_Android中的文件存储
- 《怎样解题》读书笔记
- 在oracle包体中动态创建表 PKG
- 【动态规划】钢条切割问题
- “斜杠青年” 的年终总结
- 数字 整除 互质 最大公约数 最小公倍数 判断技巧
- 某某虾App加密参数分析
- 2021年G3锅炉水处理考试题及G3锅炉水处理考试题库
热门文章
- Android–多线程之Handler下载图片源码
- 数据绑定控件之ListView
- django 快速实现完整登录系统(cookie)
- django1.4.5配置静态文件(img,css,js)访问
- UVa 10359 - Tiling
- 大厂动态规划面试汇总,提升内功
- muduo之Connector
- 说明使用assert和防错代码的区别
- etymon word write alb pain high alt increase large agency ag lose weight fat assist out~3
- linux screen 配置(下标高亮)