views:

127

answers:

2

I'm developing a web application with Seam but suddenly the theme has stopped working. I've reverted the latest changes and it doesn't solve it. I've even reinstalled the JBoss (5.1) server but it doesn't fix it either.

I see no error in the logs, just the css theme is not being shown (although it's there in the server), no css errors in the console either.

Does somebody know a way to solve this?

A: 

First thought, the path to the css file is incorrect, or maybe the file isn't publicly available.

If your template xhtml file contains a fixed path reference to the css, and you recently changed the application context, it might be looking in the wrong place. (for example, app used to be in http://127.0.0.1/peretool/ and now its located in http://127.0.0.1/pere/ or http://127.0.0.1/).

Otherwise, check web.xml for any servlets that might be blocking your css. Best way to check is typing the css file url into your browser directly and see what happens.

Download Firebug for Firefox, the network module will help you track down where its trying to get the css from.

Daan van Yperen
Thanks for the advice
Pere Villega
+3  A: 

Ok, one workmate found the solution in a bug report for Richfaces:

https://jira.jboss.org/jira/browse/RF-2316

that redirected to a couple of JIRA reports for Seam:

https://jira.jboss.org/jira/browse/JBSEAM-1009

https://jira.jboss.org/jira/browse/JBSEAM-2186

Is a nasty bug, but there's a workaround:

Using login-required="true" with view-id="" causes RF to not be able to find CSS files, which internally get mapped to /css/ URLs. The workarounds are to move secure resources into a subdirectory and only restrict those files or to declare login-required="true" for each view.

So that is, I hope it saves time to the next person that falls in this pit.

Pere Villega