This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Soft Skills: The software developer's life manual and have John Sonmez on-line!
See this thread for details.
Win a copy of Soft Skills: The software developer's life manual this week in the Jobs Discussion forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

My Faces Tomahawk tags not rendering in XHTML

 
J.C. Bustamante
Greenhorn
Posts: 22
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am trying to run an application using Spring Webflow + JSF (My Faces Tomahawk), and I am able to successfully deploy the application on Tomcat 6 through eclipse. However, when I try to hit the flow, the page is not rendering properly. When I do a view source on the page, I noticed that the tomahawk tags haven't been translated into html. The following is my XHTML code.

itemList.xhtml



The following is my web.xml



Any help would be very much appreciated.

Thanks,

Juan
 
Tim Holloway
Saloon Keeper
Pie
Posts: 17615
38
Android Eclipse IDE Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've had this problem as well. I think some of the tags in Tomahawk don't really exist. So they don't get processed, because the standard for HTML is any tag that's not understood gets passed through verbatim. My workaround has been to use non-Tomahawk equivalents.
 
J.C. Bustamante
Greenhorn
Posts: 22
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I figured out the issue. Apparently I was using Tomahawk 1.15 which requires that you install the tomahawk taglib into your web application and define the location of the taglib in the web.xml through the faces.LIBRARIES param. However, if you use tomahawk 1.17 and greater, you do not require this.

Cheers,

Juan
 
Lisa Lang
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I see the comment about setting myfaces.LIBRARIES in the web.xml file, but can you post an example? I tried adding:

<context-param>
<description>
</description>
<param-name>javax.faces.myfaces.LIBRARIES</param-name>
<param-value>/WEB-INF/tomahawk.tld</param-value>
</context-param>

(I also tried using org.apache.myfaces.LIBRARIES but that also didn't work)

 
Tim Holloway
Saloon Keeper
Pie
Posts: 17615
38
Android Eclipse IDE Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In ancient times, the TLD was an external file that had to be supplied independently of the JSP tag classes. Nowadays it can be stored in the same JAR that the classes are stored in, which virtually eliminates the need for a web.xml entry, makes installation a simple matter of copying the taglib jar into WEB-INF/lib, and as a side benefits, keeps the TLD and classes in sync.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic