The Artima Developer Community
Sponsored Link

Java Buzz Forum
Dealing with frustrating bugs with Sitemesh and MyFaces JSF

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
dion

Posts: 5028
Nickname: dion
Registered: Feb, 2003

Dion Almaer is the Editor-in-Chief for TheServerSide.com, and is an enterprise Java evangelist
Dealing with frustrating bugs with Sitemesh and MyFaces JSF Posted: Jul 22, 2005 12:47 AM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by dion.
Original Post: Dealing with frustrating bugs with Sitemesh and MyFaces JSF
Feed Title: techno.blog(Dion)
Feed URL: http://feeds.feedburner.com/dion
Feed Description: blogging about life the universe and everything tech
Latest Java Buzz Posts
Latest Java Buzz Posts by dion
Latest Posts From techno.blog(Dion)

Advertisement

A project that I am joining is using MyFaces implementation of JSF, and Sitemesh for decoration (I am a big fan of Sitemesh).

There is a known problem, where you can not put JSF code (you know, and all that rewriting of html ;)) in the decorator.

However, we were running into a problem where even if the decorated page had JSF tags in it the app would freak out and you would get no HTML response.

The JSF code was running, as the log file was showing us that.

We dropped in the JSR RI and it all worked fine, so I thought it may be a MyFaces bug. However, MyFaces works in AppFuse and the like.

This is where a debugger kicked in, where TDD wouldn't really help as much.

After walking the stack I saw that the MyFaces extensions filter was freaking it all out. When I took that out of the filter chain all worked well.

The problem wasn't actually the extensions filter itself though, the problem was the order of the filters defined via filter-mapping's in the web.xml.

Since Sitemesh is doing magic on the entire chain you should put the filter-mapping at the beginning, as then the container will run it first... and it will then chain.doFilter().... which will do its thing and when it unravels, Sitemesh will be the last to finish up.

Gotta love debugging fluff like this!

Read: Dealing with frustrating bugs with Sitemesh and MyFaces JSF

Topic: Java jar dependency management using Ivy Previous Topic   Next Topic Topic: Links for 2005-07-14 [del.icio.us]

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use