【问题标题】:Tomahawk : t:outputText not workingTomahawk : t:outputText 不工作
【发布时间】:2012-09-22 00:51:03
【问题描述】:

我正在使用JSF 1.2 并尝试按照link 实现Captcha

所以,我的第一个目标是使用t:outputText 获取“Hello world”文本,以检查Tomahawk 是否工作正常。我的JSF 1.2 基于ServletJboss AS 5.1.0 中部署良好。但是,当我点击我的Servlet 时,页面上什么也没有显示。日志中也没有任何Exceptions

下面是我的xhtml页面代码

<!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:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich"
xmlns:t="http://myfaces.apache.org/tomahawk">

<ui:composition>
<head>  
 <title>CAPTCHA</title>   
</head>
<body>
<h:form id="captchatest">
<t:outputText value="This text is coming from tomahawk"></t:outputText>
</h:form>
</body>
</ui:composition>
</html>

我在jars下面使用WEB-INF/lib

batik-awt-util-1.6-1.jar,
batik-ext-1.6-1.jar,
batik-gui-util-1.6-1.jar,
batik-util-1.6-1.jar,
commons-beanutils.jar,
commons-codec-1.3.jar,
commons-collections.jar,
commons-digester.jar,
commons-el-1.0.jar,
commons-fileupload-1.2.1.jar,
commons-io-1.3.2.jar,
commons-logging.jar,
commons-validator.jar,
el-ri.jar,
itext-1.4.8.jar,
jsf-api-1.2_13.jar,
jsf-facelets-1.1.15.B1.jar,
jsf-impl-1.2_13.jar,
myfaces.jar,
oro-2.0.8.jar,
standard-1.1.2.jar,
tomahawk-1.1.6.jar

我在faces-config.xml 中有以下条目

 <application>
        <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
        <locale-config />
    </application>

当我在浏览器中查看page source 时,我只是得到了我的 xhtml 页面中的任何内容,而不是被解析为 HTML 代码的 Tomahawk 标记 (t:outputText)。

为什么我无法在浏览器中打印t:outputText 的值?

问候,

【问题讨论】:

    标签: jsf-1.2 tomahawk


    【解决方案1】:

    我通过移除这些罐子解决了这个问题 el-ri.jar, oro-2.0.8.jar and standard-1.1.2.jar

    我在 xhtml 页面中添加了这个

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-02-27
      • 1970-01-01
      • 2015-01-05
      • 1970-01-01
      相关资源
      最近更新 更多