Search code examples
jsf-1.2tomahawk

Tomahawk : t:outputText not working


Am using JSF 1.2 and am trying to implement Captcha as per this link

So, my first objective is to get "Hello world" text using t:outputText to check if Tomahawk is working fine or not. My JSF 1.2 based Servlet deploys fine in Jboss AS 5.1.0. But, when I hit my Servlet, nothing is getting displayed on the page. Nor there are any Exceptions in the logs.

Below is my xhtml page code

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

Am using below jars in 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

I have below entry in faces-config.xml

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

When I view the page source in Browser, I just get whatever contents are there in my xhtml page instead of Tomahawk tags (t:outputText) getting parsed to HTML code.

Why am I not able to print the value of t:outputText in Browser?

Regards,


Solution

  • I solved it by removing these jars el-ri.jar, oro-2.0.8.jar and standard-1.1.2.jar

    And I added this in xhtml page

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