严重: Servlet.service() for servlet jsp threw exception org.apache.jasper.JasperException: According t
2017-06-05 18:26
495 查看
出现问题:
严重: Servlet.service() for servlet jsp threw exceptionorg.apache.jasper.JasperException: /WEB-INF/jsp/studentInfo.jsp (line: 42, column: 2) According to TLD or attribute directive in tag file, attribute items does not accept any expressions。
解决方案:
将<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"%>改成<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>(多了一个jsp路径)
问题原因:
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"%>为JSTL1.0的版本,在JSP2.0(Serlvet 2.4)及以后版本中推荐使用JSTL1.1及以上版本。
总结-------jstl与servlet的版本搭配
在Servlet2.3及以前
jsp代码
<%@taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
在servlet2.4及以后
jsp代码---引入路径多了一个“jsp”
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
原文地址:http://lichunhui.iteye.com/blog/1914706
严重: Servlet.service() for servlet jsp threw exceptionorg.apache.jasper.JasperException: /WEB-INF/jsp/studentInfo.jsp (line: 42, column: 2) According to TLD or attribute directive in tag file, attribute items does not accept any expressions。
解决方案:
将<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"%>改成<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>(多了一个jsp路径)
问题原因:
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"%>为JSTL1.0的版本,在JSP2.0(Serlvet 2.4)及以后版本中推荐使用JSTL1.1及以上版本。
总结-------jstl与servlet的版本搭配
Version | JSTL version | Requirements | |
Standard 1.2 | JSTL 1.2 (not yet JCP approved) | Servlet 2.5, JavaServer Pages 2.1 | |
Standard 1.1 | JSTL 1.1 | Servlet 2.4, JavaServer Pages 2.0 | |
Standard 1.0 | JSTL 1.0 | Servlet 2.3, JavaServer Pages 1.2 |
jsp代码
<%@taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
在servlet2.4及以后
jsp代码---引入路径多了一个“jsp”
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
原文地址:http://lichunhui.iteye.com/blog/1914706
相关文章推荐
- 严重: Servlet.service() for servlet jsp threw exception org.apache.jasper.JasperException: /WEB-INF/js
- ssm整合maven,jsp出现Servlet.service() for servlet jsp threw exception org.apache.jasper.JasperException
- 严重: Servlet.service() for servlet action threw exception org.apache.struts.chain.commands.InvalidPathException: No action config
- Servlet.service() for servlet springmvc threw exception org.apache.jasper.JasperException: /WEB-INF/
- 严重: Servlet.service() for servlet jsp threw exception
- 严重: Servlet.service() for servlet jsp threw exception
- ERROR] 19:04:48 [default] - Servlet.service() for servlet default threw exception java.lang.ClassNotFoundException: org.apache.commons.codec.binary.Hex
- 解决方法 严重: Servlet.service() for servlet default threw exception org.hibernate.TransactionException: Transaction not successfully
- org.apache.jasper.JasperException: xxxx.jsp(118,24) Attribute style invalid for tag formatNumber according to TLD
- 严重: Servlet.service() for servlet jsp threw exception
- 严重: Servlet.service() for servlet jsp threw exception The Struts dispatcher cannot be found.
- 严重: Servlet.service() for servlet jsp threw exception java.lang.NoSuchMethodError: com.opensymphony.
- 严重: Servlet.service() for servlet jsp threw exception java.lang.IllegalStateException: getOutputStream() has already been called
- 严重: Servlet.service() for servlet jsp threw exception java.lang.IllegalStateException: getOutputStream() has already been called
- 解决方法 严重: Servlet.service() for servlet default threw exception org.hibernate.TransactionException: Transaction not successfully
- 严重: Servlet.service() for servlet jsp threw exception--javax.servlet.ServletException:
- 严重: Servlet.service() for servlet jsp threw exception java.lang.NullPointerException
- 严重: Servlet.service() for servlet jsp threw exception
- 严重: Servlet.service() for servlet jsp threw exception The Struts dispatcher cannot be found.
- 严重: Servlet.service() for servlet jsp threw exception