无法加载jsp页面

时间:2012-06-13 06:45:55

标签: java jsf

我正在尝试创建一个简单的JSF项目但是index.jsp页面没有打开并抛出异常

  

javax.faces.FacesException:处理JSP页面时发生异常   第5行的/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:

     

Stacktrace:

     
    

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)     在javax.faces.webapp.FacesServlet.service(FacesServlet.java:187)at   org.apache.myfaces.webapp.MyFacesServlet.service(MyFacesServlet.java: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.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)     在   org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)     在   org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)     在   org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)     在   org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)     在   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)     在   org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)     在   org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)     在   org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)     在   org.apache.coyote.http11.Http11Protocol $ Http11ConnectionHandler.process(Http11Protocol.java:601)     在   org.apache.tomcat.util.net.JIoEndpoint $ Worker.run(JIoEndpoint.java:447)     在java.lang.Thread.run(未知来源)引起:   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:

     

Stacktrace:at   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)     在org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249)     在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:找不到   FacesContext at   javax.faces.webapp.UIComponentClassicTagBase.getFacesContext(UIComponentClassicTagBase.java:1855)     在   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)at   org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)at   javax.servlet.http.HttpServlet.service(HttpServlet.java:803)at at   org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369)     ......还有36个

我认为这是一个服务器错误,但当我试图从browser.it访问服务器工作正常。我检查了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文件夹中的库中..

0 个答案:

没有答案