错误:#{...} is not allowed in template text
2014-08-03 16:42
211 查看
今天在编写一个structs的小程序时,突然出现了 #{...} is not allowed in template text这个错误,
部分源码如下<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<h1>Article add Login user can access</h1>
登录用户为:#{loginUser }
</body>
</html>错误信息:
org.apache.jasper.JasperException: /WEB-INF/Article/add.jsp (line: 12, column: 8) #{...} is not allowed in template text
at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:42)
查找信息后,在stackfloverflaw网站上,给出了明确的解答
这是原问题链接点击打开链接
原来${...}是jsp的一种标记语言,而#{...}是JSF的一种标记语言,在jsp页面中打印model attribute 必须用${...}
部分源码如下<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<h1>Article add Login user can access</h1>
登录用户为:#{loginUser }
</body>
</html>错误信息:
org.apache.jasper.JasperException: /WEB-INF/Article/add.jsp (line: 12, column: 8) #{...} is not allowed in template text
at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:42)
查找信息后,在stackfloverflaw网站上,给出了明确的解答
这是原问题链接点击打开链接
原来${...}是jsp的一种标记语言,而#{...}是JSF的一种标记语言,在jsp页面中打印model attribute 必须用${...}
相关文章推荐
- #{...} is not allowed in template text
- org.apache.jasper.JasperException: #{..} is not allowed in template text 解决
- tomcat #{..} is not allowed in template text
- 加载jsp页面报#{} is not allowed in template text
- SpringMVC(9):JSP报错:#{...} is not allowed in template text
- jsp中 #{...} is not allowed in template text的一种详解
- Content is not allowed in prolog错误
- org.apache.jasper.JasperException: /WEB-INF/jsps/index.jsp(9,26) #{...} is not allowed in template t
- 通过ant来批量执行jmeter脚本,并生成报告(附: 生成报告时报“Content is not allowed in prolog”这个错误的解决方案)
- sax错误:org.xml.sax.SAXParseException: Content is not allowed in prolog 终极解决
- sax错误:org.xml.sax.SAXParseException: Content is not allowed in prolog解决
- 由于空格引起的xml错误之The processing instruction target matching "[xX][mM][lL]" is not allowed以及the markup in the document prec
- response错误:Request header field Content-Type is not allowed by Access-Control-Allow-Headers in prefl
- 在 12cR1 数据库中创建测试用户是报 ORA-65096 错误(2c: ORA-65049: creation of local user or role is not allowed in C)
- sax解析xml运行出现错误org.xml.sax.SAXParseException: Content is not allowed in prolog
- 用dom或者sax解析xml运行出现错误Content is not allowed in prol
- SQL SERVRE 2005 CLR TVF错误:从用户定义的表值函数获取新行时出错:Data access is not allowed in this context.
- 用dom或者sax解析xml运行出现错误Content is not allowed in prolog.
- sax错误:org.xml.sax.SAXParseException: Content is not allowed in prolog解决
- Claims系列 - ID3206错误 (A signin response may only redirect within the current web application: (url) is not allowed)