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.
我正在使用Seam开发一个Web应用程序,但突然主题已停止工作。我已经恢复了最新的变化而且没有解决它。我甚至重新安装了JBoss(5.1)服务器,但它也没有修复它。
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.
我看到日志中没有错误,只是没有显示css主题(虽然它在服务器中),控制台中也没有css错误。
Does somebody know a way to solve this?
有人知道解决这个问题的方法吗?
2 个解决方案
#1
Ok, one workmate found the solution in a bug report for Richfaces:
好的,一位同事在Richfaces的bug报告中找到了解决方案:
https://jira.jboss.org/jira/browse/RF-2316
that redirected to a couple of JIRA reports for Seam:
重定向到Seam的几个JIRA报告:
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:
是一个讨厌的bug,但有一个解决方法:
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.
使用login-required =“true”和view-id =“”会导致RF无法找到CSS文件,这些文件在内部被映射到/ css / URL。解决方法是将安全资源移动到子目录中,并仅限制这些文件或为每个视图声明login-required =“true”。
So that is, I hope it saves time to the next person that falls in this pit.
所以,我希望它可以节省下一个陷入这个坑的人的时间。
#2
First thought, the path to the css file is incorrect, or maybe the file isn't publicly available.
首先想到的是,css文件的路径不正确,或者文件可能不公开。
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/).
如果您的模板xhtml文件包含对css的固定路径引用,并且您最近更改了应用程序上下文,则可能是在错误的位置查找。 (例如,以前的应用程序位于http://127.0.0.1/peretool/,现在位于http://127.0.0.1/pere/或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.
否则,请检查web.xml以查找可能阻止您的css的任何servlet。最好的检查方法是直接在浏览器中输入css文件URL,看看会发生什么。
Download Firebug for Firefox, the network module will help you track down where its trying to get the css from.
下载Firebug for Firefox,该网络模块将帮助您追踪它试图获取CSS的位置。
#1
Ok, one workmate found the solution in a bug report for Richfaces:
好的,一位同事在Richfaces的bug报告中找到了解决方案:
https://jira.jboss.org/jira/browse/RF-2316
that redirected to a couple of JIRA reports for Seam:
重定向到Seam的几个JIRA报告:
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:
是一个讨厌的bug,但有一个解决方法:
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.
使用login-required =“true”和view-id =“”会导致RF无法找到CSS文件,这些文件在内部被映射到/ css / URL。解决方法是将安全资源移动到子目录中,并仅限制这些文件或为每个视图声明login-required =“true”。
So that is, I hope it saves time to the next person that falls in this pit.
所以,我希望它可以节省下一个陷入这个坑的人的时间。
#2
First thought, the path to the css file is incorrect, or maybe the file isn't publicly available.
首先想到的是,css文件的路径不正确,或者文件可能不公开。
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/).
如果您的模板xhtml文件包含对css的固定路径引用,并且您最近更改了应用程序上下文,则可能是在错误的位置查找。 (例如,以前的应用程序位于http://127.0.0.1/peretool/,现在位于http://127.0.0.1/pere/或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.
否则,请检查web.xml以查找可能阻止您的css的任何servlet。最好的检查方法是直接在浏览器中输入css文件URL,看看会发生什么。
Download Firebug for Firefox, the network module will help you track down where its trying to get the css from.
下载Firebug for Firefox,该网络模块将帮助您追踪它试图获取CSS的位置。