当前位置: 代码迷 >> JavaScript >> javax.servlet.jsp.JspException: Cannot find FacesContext错误解决办法
  详细解决方案

javax.servlet.jsp.JspException: Cannot find FacesContext错误解决办法

热度:834   发布时间:2012-12-19 14:13:15.0
javax.servlet.jsp.JspException: Cannot find FacesContext异常解决方法!
点击下面标题查看本文完整版:javax.servlet.jsp.JspException: Cannot find FacesContext异常解决方法!

我在myeclipse中使用jsf时抛出了以下异常,请哪位高手指定一下,jsf的相关包以加入classpath中
javax.servlet.jsp.JspException: Cannot find FacesContext
javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:399)
com.sun.faces.taglib.jsf_core.ViewTag.doStartTag(ViewTag.java:105)
org.apache.jsp.hello_jsp._jspx_meth_f_005fview_005f0(hello_jsp.java:111)
org.apache.jsp.hello_jsp._jspService(hello_jsp.java:86)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

------解决方法--------------------
根据配置jsf配置文件,访问一般是采用.faces或是/faces/*.jsp方式
jsf的执行顺序比较复杂,共分6个阶段。
restore view, apply request values, process validations, update model values, invoke application, render response
当然并不是每次都会将6个阶段执行完,可找本书仔细看看。

    
  相关解决方案