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,
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!
November 13th, 2005 at 4:47 pm
Hi,
I’m French from Paris.
I don’t understand your action with the filter.
I use AppFuse (JSF, sitemesh, spring, hibernate), and it’s right i have a problem when i call jsf in header or other page is not the main :
- header
default – main (jsf content)
- footer
i want use JSF in all jsp page mapping with sitemesh decorator, main but although default, header and footer.
How can i do ? As you can imagine it’s importante for me.
Thanks,
April 2nd, 2007 at 5:43 am
I got the same problem ….
Is some body help me ……..
Thanks
Gunjan