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

MyEclipse5.0建立JSF的有关问题

2013-09-11 
MyEclipse5.0建立JSF的问题出现如下错误:messagedescriptionTheserverencounteredaninternalerror()thatpr

MyEclipse5.0建立JSF的问题
出现如下错误:
message  

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

exception  

javax.servlet.ServletException:   Cannot   find   FacesContext
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758)
org.apache.jsp.MyJsp_jsp._jspService(MyJsp_jsp.java:94)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


root   cause  

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.MyJsp_jsp._jspx_meth_f_view_0(MyJsp_jsp.java:109)
org.apache.jsp.MyJsp_jsp._jspService(MyJsp_jsp.java:84)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


note   The   full   stack   trace   of   the   root   cause   is   available   in   the   Apache   Tomcat/5.0.27   logs.


--------------------------------------------

我用的是eclipse3.2+Myeclipse5.0,tomcat5.0   jdk1.4.
希望高人给我解决解决.


[解决办法]
URL 地址输错了 看你的WEB.XML
<servlet-mapping>
<servlet-name> Faces Servlet </servlet-name>
<url-pattern> *.jsf </url-pattern>
</servlet-mapping>

这里 <url-pattern> 默认应该是 /faces/* 那你就在JSP前面加这个faces/

否则不会被Faces Servlet解析 就报错
[解决办法]
检查配置文件中的Faces Servlet映射路径
我的异常网推荐解决方案:The server encountered an internal error () that prevented it from fulfilling this request.,http://www.myexception.cn/java-web/317.html

热点排行