tags:

views:

1005

answers:

2

Explanation:

I have a JSF command link that sets a member in the backing bean, however, when setting the backing bean member using setPropertyActionListener I get a tag not recognized error.

The project builds and deploys with no issues. The default page is displayed then the error is thrown on the page request with the setPropertyActionListener.

Other coworkers are able to run the application fine using the same setup. I am guessing I am missing a library or there is a permission issue on some directory or file.

Setup:

  • Netbeans 6.7.1
  • Apache Tomcat 6.0.18
  • JDK 1.6
  • JavaServer Faces 1.2
  • Facelets

Code:

<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:f="http://java.sun.com/jsf/core"
      xmlns:rich="http://richfaces.org/rich"&gt;

    <ui:composition template="/template.xhtml">

        <ui:define name="body">      
            <h:commandLink value="view" action="viewer">
                <f:setPropertyActionListener target="#{ViewerBean.ticket_id}" value="#{ticket.ticket_id}" />
            </h:commandLink>
        </ui:define>
    </ui:composition> 
</html>

Stacktrace: complete trace

javax.servlet.ServletException: /portal/index.xhtml @65,125 Tag Library supports namespace: http://java.sun.com/jsf/core, but no tag was defined for name: setPropertyActionListener

com.sun.facelets.tag.TagException: /portal/index.xhtml @65,125 Tag Library supports namespace: http://java.sun.com/jsf/core, but no tag was defined for name: setPropertyActionListener

Libraries in Apache:

  • annotations-api.jar
  • catalina.jar
  • el-api.jar
  • jasper.jar
  • mysql-connector-java-5.1.7-bin.jar
  • tomcat-coyote.jar
  • tomcat-i18n-fr.jar
  • catalina-ant.jar
  • catalina-tribes.jar
  • jasper-jdt.jar
  • tomcat-dbcp.jar
  • tomcat-i18n-ja.jar
  • catalina-ha.jar
  • commons-logging-1.1.1.jar
  • jasper-el.jar
  • jsp-api.jar
  • servlet-api.jar
  • tomcat-i18n-es.jar

Libraries in Project:

  • activation.jar
  • commons-digester.jar
  • ezmorph-1.0.6.jar
  • jstl.jar
  • richfaces-ui-3.3.0.GA.jar
  • commons-beanutils-1.8.0.jar
  • commons-lang-2.4.jar
  • jsf-api.jar
  • jxl.jar
  • standard.jar
  • commons-beanutils.jar
  • commons-logging-1.1.1.jar
  • jsf-facelets.jar
  • mail.jar
  • commons-collections-3.2.jar
  • commons-logging.jar
  • jsf-impl.jar
  • richfaces-api-3.3.0.GA.jar
  • commons-collections.jar
  • el-impl-1.0.jar
  • json-lib-2.2.3-jdk15.jar
  • richfaces-impl-3.3.0.GA.jar
+1  A: 

You do not precise which version of JSF you are using in your project.

Indeed, the setPropertyActionListener tag has been included in JSF 1.2 and is not available for a JSF 1.1 project.

That may explain the problem you encounter...

romaintaz
sorry, i am running JSF 1.2. i am in the process of verifying.
Berek Bryan
Check that you do not have duplicate JAR for JSF implementation, or if you do not have other JSF implementations (myfaces for example)...
romaintaz
well, i am pretty sure this was the issue but i could not find out exactly what the problem was. i am adding what i did as an answer you giving you the credit.
Berek Bryan
A: 

[Edit]

This issue has resurfaced, however, I think I have found a solution. I think something was wrong with my jsf-facelets.jar file.

I downloaded the newest version and added it to the project. Everything seems to be super now.

2010.01.26


I could not verify what the exact conflict was so I did a fresh install.

I am on an Ubuntu box running Netbeans 6.7, which was manually installed from the Netbeans website. Apache Tomcat was installed with the IDE.

First I removed the visible directories of both Netbeans and Tomcat. I actually moved them to the Trash just in case some went horribly wrong.

$ mv /home/bbryan/apps/netbeans6.7 /home/bbryan/.local/share/Trash
$ mv /home/bbryan/apps/apache-tomcat-6.0.18 /home/bbryan/.local/share/Trash

After these two directories were removed I removed the hidden netbeans directory. This is important; if you don't the next install of netbeans and tomcat will have all the same settings as before both good and bad.

$ mv /home/bbryan/.netbeans /home/bbryan/.local/share/Trash

Once all three directories were removed I did a fresh install and made a few minor adjustments for our local setup and BINGO.

Berek Bryan