首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > J2EE开发 >

org.apache.jasper.JasperException: An exception occurred processing JSP page /

2013-09-11 
springMVC中配置JSTL的问题麻烦高手解答,我下面的错误是什么意思?谢谢!HTTP Status 500 -type Exception r

springMVC中配置JSTL的问题
麻烦高手解答,我下面的错误是什么意思?谢谢!

HTTP Status 500 -

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: An exception occurred processing JSP page /login.jsp at line 7

4: <head></head> 
5: <body> 
6: <form name="User" action="/myMVC/login.do" method="post">
7: <spring:bind path="command.username"> 
8: <spring:message code="username"/><input type="text" name="${status.expression}" value="${status.value}"/><br>
9: <font color="red"><b>${status.errorMessage}</b></font><br>
10: </spring:bind>


Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:413)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

root cause

java.lang.IllegalStateException: No WebApplicationContext found: no ContextLoaderListener registered?
org.springframework.web.servlet.support.RequestContextUtils.getWebApplicationContext(RequestContextUtils.java:84)
org.springframework.web.servlet.support.RequestContext.initContext(RequestContext.java:206)
org.springframework.web.servlet.support.JspAwareRequestContext.initContext(JspAwareRequestContext.java:74)
org.springframework.web.servlet.support.JspAwareRequestContext.<init>(JspAwareRequestContext.java:48)
org.springframework.web.servlet.tags.RequestContextAwareTag.doStartTag(RequestContextAwareTag.java:65)
org.apache.jsp.login_jsp._jspService(login_jsp.java:79)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)


其中 //////////////////web.xml/////////////////////
<web-app version="2.4" 
 xmlns="http://java.sun.com/xml/ns/j2ee" 
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
 xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee 
 http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<servlet>
<servlet-name>dispatcherServlet</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
  </servlet>

  <servlet-mapping>
  <servlet-name>dispatcherServlet</servlet-name>
  <url-pattern>*.do</url-pattern>
</servlet-mapping>
<jsp-config>
<taglib> 
  <taglib-uri>/spring</taglib-uri> 
  <taglib-location>/WEB-INF/spring.tld</taglib-location> 
</taglib>
</jsp-config>
</web-app>

//////////////login.jsp/////////////////

<%@taglib prefix="spring" uri="/spring"%>
<%@page contentType="text/html;charset=GBK"%>
<html> 
<head></head> 
<body> 
  <form name="User" action="/myMVC/login.do" method="post">


<spring:bind path="command.username"> 
  <spring:message code="username"/><input type="text" name="${status.expression}" value="${status.value}"/><br>
<font color="red"><b>${status.errorMessage}</b></font><br>
  </spring:bind>
<spring:bind path="command.password"> 
  <spring:message code="password"/> <input type="password" name="${status.expression}" value="${status.value}"/><br>
<font color="red"><b>${status.errorMessage}</b></font><br>
  </spring:bind>
<spring:bind path="command.password2"> 
  <spring:message code="password2"/> <input type="password" name="${status.expression}" value="${status.value}"/><br>
<font color="red"><b>${status.errorMessage}</b></font><br>
  </spring:bind>
<input type="submit" value="<spring:message code="submit"/>"/>
  </form> 
</body> 
</html>



[解决办法]
jstl不需要在spring中配
我的异常网推荐解决方案:An exception occurred processing JSP page,http://www.myexception.cn/j2se/33144.html
我的异常网推荐解决方案:The server encountered an internal error () that prevented it from fulfilling this request.,http://www.myexception.cn/java-web/317.html

热点排行