日期:2014-05-18  浏览次数:20679 次

紧急求救,用jsf开发jsp页面,页面无法打开的问题。
用jsf开发的jsp页面,打开页面提示如下错误
2007/08/07   14:58:53   com.sun.facelets.FaceletViewHandler   handleRenderException
致命的:   Error   Rendering   View[/jsp/NewCostumer.jsp]
com.sun.facelets.FaceletException:   Error   Parsing   /jsp/NewCostumer.jsp:   Error   Traced[line:   1]   The   markup   in   the   document   preceding   the   root   element   must   be   well-formed.
at   com.sun.facelets.compiler.SAXCompiler.doCompile(SAXCompiler.java:234)
at   com.sun.facelets.compiler.Compiler.compile(Compiler.java:104)
at   com.sun.facelets.impl.DefaultFaceletFactory.createFacelet(DefaultFaceletFactory.java:192)
at   com.sun.facelets.impl.DefaultFaceletFactory.getFacelet(DefaultFaceletFactory.java:141)
at   com.sun.facelets.impl.DefaultFaceletFactory.getFacelet(DefaultFaceletFactory.java:93)
at   com.sun.facelets.FaceletViewHandler.buildView(FaceletViewHandler.java:503)
at   com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:553)
at   com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:108)
at   com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:243)
at   com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:140)
at   javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
at   org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at   org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at   org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at   org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at   org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at   org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at   org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at   org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at   org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
at   org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
at   org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at   org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at   org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at   java.lang.Thread.run(Thread.java:619)

请高人指点如何解决。

------解决方案--------------------
<f:view> 標簽要包含整個 <head> 與整個 <body>
你把 <f:view> 位置換下