PROBLEM: The "rich:fileUpload" associated component is not rendered correctly and not functional.
JBoss Tools Development snapshot
JBoss AS 7.1.1 Final
STEPS TO REPRODUCE:
1. Get Eclipse with JBoss tools - Indigo Development Snapshot - (http://download.jboss.org/jbosstools/updates/development/indigo/)
2. Fron JBoss Central view click on RichFaces Project, follow the default steps to create a RichFaces project.
3. Create an empty .XHTML page alog with the pages that already exist in the start project.
4. Fron the Palette (in the right) expahd JBoss RichFaces and select fileUpload component
5. Add basic information in the dialog with the properties / attributes that is opened. You do not even need a bean at this stage behind the component.
6. Finish the creation of the component.
7. Open the page you jsut created -> the file upload component is not rendered correctly.
The pages created by the start project are rendered correctly and functional, the only page / component that is not rendered correctly is the one containing the fileUpload component.
In FF you can see in the error console a mesage telling you "RichFaces is not defined" (see bellow).
The source of the page in FF is
The exploded WAR under JBoss is attached.
The Eclipse project is attached.
Is this a bug or a problem of configuration / missing dependencies?
Any help / information is appreciated,
You are right, modifying the upload.xhtml file to:
<rich:fileUpload addLabel="Add" clearAllLabel="Clear All"
clearLabel="Clear" maxFilesQuantity="10" noDuplicate="true"
title="File Upload" uploadLabel="Upload">
made it work.
I remember reading before, some time ago, about this but I did not manage to make it work at that time and dropend the problem, but now it works.
If somebody else stumbles into the problem, just use the eclipse project attached and the upload.xhtml file modifed as in this post and it is ok.
After fixing the issue and the page looks fine, I've deployed the WAR on the production server which has the same JBoss/RichFaces setup, but JBoss is proxied by Apache. In the production server the problem appears again. JBoss is proxied by Apache on a context path (e.g.: somehost.com/as), not directly on the root of the domain.
Has anyone else encountered this problem?
Unfortunately I did not and probably will never have the time to do some more debugging on this issue, but I can state that the issue is related to Apache2 proxy-ing and the workarround to the problem is to not proxy JBoss to a path on the domain name (e.g. www.example.com/jboss) but to proxy it under a subdomain (e.g. www.jboss.example.com). This WA is tested and confirmed.
This workarround solves the issue of resource adressing. In any case, the problem of addressing resources comes from Apache2, not JBoss.