[
https://jira.jboss.org/jira/browse/JBIDE-4500?page=com.atlassian.jira.plu...
]
Max Rydahl Andersen commented on JBIDE-4500:
--------------------------------------------
Okey, so I took this for a spin (again).
First of all: I see *zero* difference in behavior when running the same app inside or
outside of JBDS or JBoss Tools so I'm ruling out the option that JBDS/JBoss Tools is
causing any of this at runtime. If you don't believe that, then please just run the
tests in a normal AS since it does not matter - this thing fails no matter what. I just
want to find out if it is AS or Richfaces that has the bug.
I created two projects: csstest using recent JBoss Tools/JBDS with EAP 5/Seam 2.2 and a
myproject generated with seam project.
The visual result of this can be seen in JBIDE-5846 where the styles are rendered
differently and I believe this issue is the cause of that.
In "myproject" (seamgen) I get:
<link class="user"
href="/myproject/a4j/s/3_3_1.GAstylesheet/theme.xcss/DATB/eAGTcz60MXT5DGkAD2IDhA__"
rel="stylesheet" type="text/css" />
<link class="user" href="/myproject/stylesheet/theme.css"
rel="stylesheet" type="text/css" />
In "csstest" (jbosstools-seamgen) I get:
<link class="user" href="/csstest/stylesheet/theme.xcss"
rel="stylesheet" type="text/css" />
<link class="user" href="/csstest/stylesheet/theme.css"
rel="stylesheet" type="text/css" />
So yes, there is clearly two different behaviors and the only difference I can spot is
that the seam-gen project *duplicates* the styles by putting them into the WEB-INF/classes
directory too.
The exact thing this bug is talking about.
To verify this I removed the stylesheet inside WEB-INF/classes of the deployed myproject
and voila, the bug appears.
If Richfaces uses ServletContext#getResourceAsStream() then this must be a bug in AS, so I
agree with the part of Alexanders conclusion that says JBoss 5 VFS blocks access to files
from web application context, but it has nothing to do with JBDS, but more likely some
Seam specific deployment problem.
xcss templates should be copied to the classpath on deploy
----------------------------------------------------------
Key: JBIDE-4500
URL:
https://jira.jboss.org/jira/browse/JBIDE-4500
Project: Tools (JBoss Tools)
Issue Type: Bug
Components: UpStream
Affects Versions: 3.0.1.GA
Environment: winxp x86, jdk6, jboss5
Reporter: Jacques Lemire
Assignee: Alexander Smirnov
Priority: Critical
Fix For: 3.1.0.CR2
In projects generated through "File" -> "New" -> "Seam web
project", the facelets template "layout/template.xhtml" contains the
following component in the "head" section:
layout/template.xhtml:
<a:loadStyle src="resource:///stylesheet/theme.xcss"/>
This component, from a4j should transform the "richfaces templatable css"
(xcss) file into a real CSS file and render as a <link> tag containing an a4j
resource url. In projects created from the command-line seam-gen script, the output is as
expected:
<link class='user' rel='stylesheet' type='text/css'
href='/testxcss/a4j/s/3_2_2.SR1stylesheet/theme.xcss/DATB/eAFrvajdHLp8hjQAEgwDtA__'
/>
However, using jboss tools, I get:
<link class='user' rel='stylesheet' type='text/css'
href='/SeamThemeTest/stylesheet/theme.xcss' />
This version does not work, however, as the xcss file is returned to the browser as is.
By looking at the differences between the seam-gen project and the jbosstools project, i
noticed the following section of the build.xml ant file generated by seam-gen:
<copy todir="${war.dir}/WEB-INF/classes">
<fileset dir="${basedir}/resources">
<include name="**/*.xcss"/>
</fileset>
<!-- move XCSS into classpath for now
loading from web context only works in JBoss AS 4 -->
<fileset dir="${basedir}/view">
<include name="**/*.xcss"/>
</fileset>
</copy>
This step is not done by jbosstools (3.1.0), and indeed, by doing a quick web search, I
fell on the following jira:
https://jira.jboss.org/jira/browse/JBAS-6034, which states
that:
> [...] that would work in 4.2.x but not in jboss5 where the root of the war is no
longer a part of the war's classpath (and never should have been!)
Please fix it as soon as possible, as this problem affects any generated site and is
pretty difficult to debug. On the other hand, it should be very easy to fix.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira