Я использую простой пример программы, использующей RichFaces 4.0, но, к сожалению, я не могу настроить обработчик представления для Richfaces 4.0.
В моей папке WEB-INF есть следующие библиотеки
Викисклада BeanUtils-1.7.0.jar
Викисклад коллекция-3.2.jar
Обще-варочного-1.8.jar
Обще-каротаж 1.0.4.jar
cssparser-0.9.5.jar
гуавы-r08.jar
JSF-апи-2.0.4-b09.jar
JSF-осущ-2.0.4-b09.jar
JSTL-1.2.jar
RichFaces-компонента-апи-4.0.0.20110209-M6.jar
RichFaces-компонента-щ-4.0.0.20110209-M6.jar
RichFaces-ядро-апи-4.0.0.20110209-M6.jar
RichFaces-ядро-осущ-4.0.0.20110209-M6.jar
бурса-1.3.jar
my web.xml
<?xml version="1.0" encoding="UTF-8"?>
xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" xsi: schemaLocation =" http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>/faces/*</url-pattern>
</servlet-mapping>
<context-param>
<param-name>javax.faces.DISABLE_FACELET_JSF_VIEWHANDLER</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>org.richfaces.enableControlSkinning</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>org.richfaces.enableControlSkinningClasses</param-name>
<param-value>false</param-value>
</context-param>
<context-param>
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
<param-value>.xhtml</param-value>
</context-param>
<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>server</param-value>
</context-param>
<context-param>
<param-name>javax.faces.PROJECT_STAGE</param-name>
<param-value>Development</param-value>
</context-param>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
<login-config>
<auth-method>BASIC</auth-method>
</login-config>
мои лица-config.xml
<?xml version="1.0" encoding="UTF-8"?>
http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
index.jsp
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
start.xhtml
xmlns:h="http://java.sun.com/jsf/html"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets">
RichFaces
<rich:panel header="RichFaces">
Что происходит, так как у меня нет обработчика представления, поэтому при запуске приложения мне предлагается загрузить файл из браузера?
Если я включу jsf-facelets.jar и настрою его в face-config.xml, то при развертывании я получу ошибку lib lib. Браузер не отображает никаких компонентов RichFaces4.0, отображается только текст.
См. Ниже ошибку для справки.
ИНФОРМАЦИЯ: Контейнер org.apache.catalina.core.ContainerBase. [Catalina]. [Localhost]. [/ RichFacesJSF20] уже запущен
22-фев-2011 19:08:52 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
INFO: Добавлена библиотека из: jar: file: / C: /Documents%20and%20Settings/modhas2/My%20Documents/NetBeansProjects/RichFacesJSF20/build/web/WEB-INF/lib/jsf-facelets.jar! / META-INF / JSF-core.taglib.xml
22-фев-2011 19:08:52 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
INFO: добавлена библиотека из: jar: file: / C: /Documents%20and%20Settings/modhas2/My%20Documents/NetBeansProjects/RichFacesJSF20/build/web/WEB-INF/lib/jsf-facelets.jar! / META-INF / JSF-html.taglib.xml
22-фев-2011 19:08:52 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
ИНФОРМАЦИЯ: Добавлена библиотека из: jar: file: / C: /Documents%20and%20Settings/modhas2/My%20Documents/NetBeansProjects/RichFacesJSF20/build/web/WEB-INF/lib/jsf-facelets.jar! / META-INF / JSF-ui.taglib.xml
22-фев-2011 19:08:52 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
ИНФОРМАЦИЯ: Добавлена библиотека из: jar: file: / C: /Documents%20and%20Settings/modhas2/My%20Documents/NetBeansProjects/RichFacesJSF20/build/web/WEB-INF/lib/jsf-facelets.jar! / META-INF / JSTL-core.taglib.xml
22-фев-2011 19:08:52 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
ИНФОРМАЦИЯ: Добавлена библиотека из: jar: file: / C: /Documents%20and%20Settings/modhas2/My%20Documents/NetBeansProjects/RichFacesJSF20/build/web/WEB-INF/lib/jsf-facelets.jar! / META-INF / JSTL-fn.taglib.xml
22-фев-2011 19:08:52 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
INFO: добавлена библиотека из: jar: file: / C: /Documents%20and%20Settings/modhas2/My%20Documents/NetBeansProjects/RichFacesJSF20/build/web/WEB-INF/lib/jsf-impl-2.0.4 -b09.jar! /META-INF/mojarra_ext.taglib.xml
22-фев-2011 19:08:52 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
SEVERE: Ошибка загрузки библиотеки: jar: файл: / C: /Documents%20and%20Settings/modhas2/My%20Documents/NetBeansProjects/RichFacesJSF20/build/web/WEB-INF/lib/richfaces-components-ui-4.0 .0.20110209-M6.jar! /META-INF/a4j.taglib.xml
java.io.IOException: Ошибка синтаксического анализа [jar: file: / C: / Documents% 20and% 20Settings / modhas2 / My% 20Documents / NetBeansProjects / RichFacesJSF20 / build / web / WEB-INF / lib / richfaces-components- ui-4.0.0.20110209-M6.jar! /META-INF/a4j.taglib.xml]:
at com.sun.facelets.compiler.TagLibraryConfig.create(TagLibraryConfig.java:410)
at com.sun.facelets.compiler.TagLibraryConfig.loadImplicit(TagLibraryConfig.java:431)
at com.sun.facelets.compiler.Compiler.initialize(Compiler.java:87)
at com.sun.facelets.compiler.Compiler.compile(Compiler.java:104)
at com.sun.facelets.impl.DefaultFaceletFactory.createFacelet(DefaultFaceletFactory.java:218)
at com.sun.facelets.impl.DefaultFaceletFactory.getFacelet(DefaultFaceletFactory.java:149)
at com.sun.facelets.impl.DefaultFaceletFactory.getFacelet(DefaultFaceletFactory.java:100)
at com.sun.facelets.FaceletViewHandler.buildView(FaceletViewHandler.java:517)
at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:567)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:121)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:313)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
at org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:709)
at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:680)
at org.apache.jsp.index_jsp._jspService(index_jsp.java:59)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:386)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:662)
Вызывается: org.xml.sax.SAXException: Обработка ошибок [jar: file: / C: / Documents% 20 и% 20Settings / modhas2 / My% 20Documents / NetBeansProjects / RichFacesJSF20 / build / web / WEB-INF / lib/richfaces-components-ui-4.0.0.20110209-M6.jar!/META-INF/a4j.taglib.xml@2,255]
at com.sun.facelets.compiler.TagLibraryConfig$LibraryHandler.error(TagLibraryConfig.java:376)
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:134)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:384)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:318)
at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.rootElementSpecified(XMLDTDValidator.java:1621)
at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.handleStartElement(XMLDTDValidator.java:1900)
at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.startElement(XMLDTDValidator.java:764)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:1363)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$ContentDriver.scanRootElementHook(XMLDocumentScannerImpl.java:1318)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:3103)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:922)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:198)
at com.sun.facelets.compiler.TagLibraryConfig.create(TagLibraryConfig.java:407)
... 39 more
Пожалуйста, предложите, как использовать RichFaces4.0 с использованием Facelets JSF2.0