Tomahawk : t:outputText not working - jsf-1.2

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,

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

Related

ASP page Error - 0x80004005 When trying to get Request("variable")

I am trying to read a post variable and I get this error:
0x80004005 - unknown exception
The line causing it:
request("total"))
I read something about permissions may be causing it, tried to implement, but it is still happening.
UPDATE:(added full code)
<%#LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!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">
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
<form id="form4" name="form4" action="url" method="post">
<%
total=request("total")
%>
</form>
</body>
</html>
Check your post data's length, if too large , then 'unknown exception' occurs.
FYR: http://www.bigresource.com/ASP-Max-Char-Length-of-POST-variable-8cxQFVTf.html

Syntax errors creating an ASP.NET page using MonoDevelop

I'm using MonoDevelop on Ubuntu to create ASP.NET pages. My code is producing syntax errors.
<%# Page Language="C#" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML
1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head runat="server">
<title>index</title>
<script runat="server"></script>
</head>
<body>
<form id="form1" runat="server">
<p>Hello Word!</p>
</form>
</body>
</html>
1:/home/ublinuxyu/program/c#/index.aspx(0,0): Error CS1525: Unexpected symbol `<' (CS1525) (index)
2:/home/ublinuxyu/program/c#/index.aspx(4,4): Error CS1646: Keyword, identifier, or string expected after verbatim specifier: # (CS1646) (index)
What have I done wrong here?
It looks like you set the build action of the aspx file to "Compile" instead of "Content".
You can fix it using the context menu on the file in the solution pad, or by using the property pad when that file is selected.

Trouble With Static UICulture Setting and Implicit Localization

I’m playing with implicit localization on my Win7 box via VS2010 and something doesn’t quite seem right. I have a trivial page where I set the resourceKey of my GO Button to “bnGO”:
<%# Page Language="VB" culture="auto" meta:resourcekey="PageResource1" uiculture="es" %>
<!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">
<head runat="server">
<title>Test Implicit Localization</title>
</head>
<body>
<form id="form1" runat="server">
<asp:Button ID="bnGO" runat="server" meta:resourcekey="bnGO" />
</form>
</body>
</html>
Then I have both testForm.aspx.resx and testForm.es.aspx.resx files that set the value of bnGO.Text appropriately:
When I run the application, the GO Button displays the "Go Forth!" text defined in the default testForm.aspx.resx even though testForm.aspx has uiculture set to “es” (which I think is Spanish).
What am I doing wrong?
The name of the file should be:
testForm.aspx.es.resx
Not
testForm.es.aspx.resx

How can I define an entity such as nbsp in an asp.net application

I have an asp.net application that renders and works correctly in all browsers. However when checking with the validator at http://validator.w3.org/ I get the following error:
reference to undeclared general entity nbsp
The Error is also keeping me from being able to use loadstorm to test the application. Loadstorm gives me this error:
Entity 'nbsp' not defined
changing each "nbsp" to "#160" is not an option because they are coming from a ckeditor that users enter content into
I have also tried doing something like the following on the page, but it doesn't work either.
<!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp " "> ]>
should I be trying to declare it somewhere else or be doing something entirely different all together?
Your page is probably missing the XHTML DOCTYPE declaration. Assuming you are going to output an XHTML 1.0 transitional markup, please add the following before everything else on your XHTML output:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<asp:PasswordRecovery > How to Customise the E-mail sent to the user?

I have currently setup a basic membership system in ASP.NET and have used the
<asp:PasswordRecovery ID="PasswordRecovery1" Runat="server"></asp:PasswordRecovery>
To deal with the password recovery, Which Works great but how would one customise the e-mail such as changing the"Subject" and the actual body content of the e-mail ?
Implement the OnSendingMail event for the passwordrecovery control.
the parameter (MailMessageEventArgs e) is the MailMessage object and you can update the subject/body etc fields before the message is actually sent.
Please see David Winchester's answer at this link
https://forums.asp.net/post/3167737.aspx
I've edited his answer as following:
<asp:PasswordRecovery ID="PasswordRecovery1" runat="server">
<MailDefinition
From="noreply#gmail.com"
Subject="Your temporary password!"
IsBodyHtml="true"
Priority="High"
BodyFileName="~/Templates/PasswordRecoveryMail.htm">
</MailDefinition>
</asp:PasswordRecovery>
Content of PasswordRecoveryMail.htm file
<!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">
<head>
<title></title>
</head>
<body>
<div>
Please return to the site and log in using the following information.
</div>
<p>Username: <%UserName%></p>
<p>Password: <%Password%></p>
</body>
</html>
You can edit the MailDefinition settings.
MailDefinition-BodyFileName="uri"
MailDefinition-CC="string"
MailDefinition-From="string"
MailDefinition-IsBodyHtml="True|False"
MailDefinition-Priority="Normal|Low|High"
MailDefinition-Subject="string"

Resources