0

Building a WEB application using JSF 2,Spring 2.5,Maven 3,RichFaces,facelets

Ive been searching for answers and to no avail ended up with nothing, Ive been looking into my libraries version too,i think Im missing something. i just want to try out this new <f:event> tag for JSF 2

here are my specs

  • tomcat 7.0.27
  • jstl-api-1.2.jar
  • jstl-impl-1.2.jar
  • jsf-api-2.1.3.jar
  • jsf-impl-2.1.3.jar
  • jsf-facelets-1.1.10.jar
  • richfaces-api-3.3.3.jar
  • richfaces-impl-3.3.3.jar
  • richfaces-ui-3.3.3.jar

xhtml file

<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:c="http://java.sun.com/jsp/jstl/core"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich">

web.xml

<web-app xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
id="WebApp_ID" version="3.0">

faces-config.xml

<faces-config xmlns="http://java.sun.com/xml/ns/javaee"
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-facesconfig_2_0.xsd"
version="2.0">

here is block of my stack trace:

com.sun.facelets.tag.TagException: /twofalogin.xhtml @18,71 <f:event> Tag Library supports namespace: http://java.sun.com/jsf/core, but no tag was defined for name: event

FYI: Ive tried using the exact same libs as a simpe JSF 2 project on eclipse without maven and using JSP instead of xhtml, i could find the <f:event> on eclipse auto complete. I havent tried running it on my tomcat though.

Thanks

jaded
  • 53
  • 2
  • 6
  • are you using JSF and or simple html and tags ? – Daniel May 14 '12 at 09:36
  • simple and . let me try & thanks – jaded May 14 '12 at 09:37
  • got the same error but for the head this time. Thanks – jaded May 14 '12 at 10:09
  • are you sure that the jsf jars in the classpath? – Daniel May 14 '12 at 10:17
  • yes sir, jsfs lib are inside my WEB-INF\lib it is as if i am still using jsf 1.2, i have upgraded tomcat 6.0.32 to tomcat 7,changed my web.xml and faces config into the configuration above. it is only on more on the new jsf 2 capabilities tomcat would give me such errors. Thanks – jaded May 14 '12 at 10:22
  • 1
    the warning is regarding the first tag defined in your page... it not proceeds to the others...I'd recommend you to read this answer by BalucS... http://stackoverflow.com/a/4532870/617373 – Daniel May 14 '12 at 10:33
  • thanks for the fast reply sir, i will try to understand and read it and see if it can help my problem but just to clarify i am not upgrading from jsf 1.2 to jsf 2.x i am having a problem with JSF 2.1 that I am not able to use these specific tags f:event,h:head,h:body .. etc Thanks – jaded May 14 '12 at 10:55
  • 1
    If you're not migrating why are you using RichFaces 3.3.3 which is designed for JSF 1.2? By the way, `/` is not required for ``. This problem indicates that the IDE thinks that you're using JSF 1.2. – BalusC May 14 '12 at 11:11
  • @BalusC and Daniel Thank you so much sir. I am finally able to use .Solved my problem thanks to you guys.. upgraded RF 3.3.3 to RF 4.1.0.deleted jsf-facelets-1.1.10.jar,followed this tutorial http://www.ibm.com/developerworks/java/library/j-richfaces4/index.html?ca=drs- , but im still wondering why this solved it? Thanks – jaded May 14 '12 at 13:22

0 Answers0