0
AM和AM試圖實現Captcha
按本link戰斧:T:使用<code>JSF 1.2</code>的outputText不工作
所以,我的第一個目標是使用t:outputText
檢查Tomahawk
工作正常得到「Hello World」文本或不。我的JSF 1.2
根據Servlet
部署在Jboss AS 5.1.0
罰款。但是,當我點擊我的Servlet
時,頁面上沒有顯示任何內容。日誌中也沒有任何Exceptions
。
下面是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
我xhtml
網頁代碼中使用下面jars
<!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>
上午我有以下條目faces-config.xml
<application>
<view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
<locale-config />
</application>
當我溴查看page source
owser,我只是得到我的xhtml頁面中的任何內容,而不是Tomahawk標記(t:outputText)被解析爲HTML代碼。
爲什麼我無法在瀏覽器中打印t:outputText
的值?
問候,