jsf 2 - PrimeFaces doesn't work -
i have problem in newfile.xhtml. use jsf2.2.
when put library primefaces-3.5.jar web/lib folder , restart tomcat server, web page not work anymore. when remove primefaces jar file every thing works without showing primefaces tags.
i put external jar correctly, think there wrong:
my web.xml file
<!doctype web-app public "-//sun microsystems, inc.//dtd web application 2.3//en" "http://java.sun.com/dtd/web-app_2_3.dtd" > <web-app> <display-name>sample jsf 2 filter login app</display-name> <!-- login filter --> <filter> <filter-name>loginfilter</filter-name> <filter-class>somepackage.loginfilter</filter-class> </filter> <!-- set login filter secure pages in /secured/* path of application --> <!-- staring jsf --> <servlet> <servlet-name>faces servlet</servlet-name> <servlet-class>javax.faces.webapp.facesservlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <!-- jsf url mapping --> <servlet-mapping> <servlet-name>faces servlet</servlet-name> <url-pattern>*.xhtml</url-pattern> </servlet-mapping> <!-- default go secured welcome page --> <welcome-file-list> <welcome-file>newfile.xhtml</welcome-file> </welcome-file-list> </web-app>
my newfile.xhtml :
<?xml version="1.0" encoding="utf-8"?> <!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:p="http://primefaces.org/ui"> <h:head> </h:head> <h:body> <h1>hello world primefaces</h1> <h:form> <p:editor value="#{editor.value}" /> </h:form> </h:body> </html>
as suggested on this post, primefaces 3.5 not support jsf 2.2, starting 4.0 has been supported. should consider switch latest primefaces release.
read documentation more details: primefaces user's guide 3.5
Comments
Post a Comment