1

単純な JSF プロジェクトを作成しようとしていますが、index.jsp ページが開かず、例外がスローされます

javax.faces.FacesException: 5 行目で JSP ページ /index.jsp を処理中に例外が発生しました

2: <%@ taglib prefix="f" uri="http://java.sun.com/jsf/core"%> 3: <%@ taglib prefix="h" uri="http://java. sun.com/jsf/html"%> 4: 5: 6: 7: 8:

スタックトレース:

org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:347) org.apache.myfaces.application.jsp.JspViewHandlerImpl.buildView(JspViewHandlerImpl.java:486) org.apache.myfaces.application.jsp. JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:337)

org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:41)

org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:140) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:187) at org.apache.myfaces.webapp.MyFacesServlet.service(MyFacesServlet.ジャワ:103)

org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) org.jboss.web.tomcat.filters.ReplyHeaderFilter. doFilter(ReplyHeaderFilter.java:96) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) org.apache org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve) で .catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235) .java:190) org.jboss.web.tomcat.security.JaccContextValve.org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126) で invoke(JaccContextValve.java:92) org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70) でorg.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) で org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) で org.jboss.web.tomcat.service.jca .CachedConnectionValve.invoke(CachedConnectionValve.java:158) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330) org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Unknown Source) 原因: org.apache.jasper.JasperException: 5 行目で JSP ページ /index.jsp を処理中に例外が発生しました

2: <%@ taglib prefix="f" uri="http://java.sun.com/jsf/core"%> 3: <%@ taglib prefix="h" uri="http://java. sun.com/jsf/html"%> 4: 5: 6: 7: 8:

スタックトレース: org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:498) で org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:411) で org.apache.jasper.servlet.JspServlet .serviceJspFile(JspServlet.java:322) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache. catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java: 638) org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:444) で org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:382) org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:310) org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:341) ... さらに 26 原因: java.lang.RuntimeException: Cannot find FacesContext at javax.faces.webapp.UIComponentClassicTagBase.getFacesContext(UIComponentClassicTagBase.java:1855) at javax.faces.webapp.UIComponentClassicTagBase.setJspId(UIComponentClassicTagBase.java:1672) ) org.apache.jsp.index_jsp._jspx_meth_f_005fview_005f0(index_jsp.java:87) で org.apache.jsp.index_jsp._jspService(index_jsp.java:64) で 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:369) ... 36 もっと見る

サーバーエラーだと思っていましたが、ブラウザからサーバーにアクセスしようとすると正常に動作します.JSFのライブラリをチェックアウトし、jbossサーバーにも含まれています...助けてください...

index.jsp

<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="f"  uri="http://java.sun.com/jsf/core"%>
<%@ taglib prefix="h"  uri="http://java.sun.com/jsf/html"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<f:view>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<h:outputLabel value="i am here!!!!!!"></h:outputLabel>
</body>
</html>
</f:view>

評判レベルのため、フォルダ構造の画像をアップロードできません..

lib フォルダにはライブラリが含まれていませんが、javaResources:src フォルダ内のライブラリに含まれています。

4

0 に答える 0