JSF核心问题:javax.servlet.ServletException [英] JSF Core issue: javax.servlet.ServletException

查看:114
本文介绍了JSF核心问题:javax.servlet.ServletException的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

说明:

我有一个JSF命令链接,该链接设置了backing bean中的一个成员,但是,当使用setPropertyActionListener设置backing bean成员时,我得到了一个标记无法识别的错误.

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.

该项目的构建和部署没有任何问题.显示默认页面,然后使用setPropertyActionListener在页面请求上引发错误.

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.

设置:

  • Netbeans 6.7.1
  • Apache Tomcat 6.0.18
  • JDK 1.6
  • JavaServer Faces 1.2
  • 手镯

代码:

<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">

    <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>

堆栈跟踪: 完整跟踪

javax.servlet.ServletException:/portal/index.xhtml @ 65,125标记库支持名称空间: http: //java.sun.com/jsf/core ,但未为名称定义标签:setPropertyActionListener

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标记库支持名称空间:

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

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
  • 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

项目中的库

  • 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
  • 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

推荐答案

您不精确确定项目中使用的JSF版本.

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

实际上是 setPropertyActionListener 标记已包含在JSF 1.2中,不适用于JSF 1.1项目.

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...

这篇关于JSF核心问题:javax.servlet.ServletException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆