Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 318109

Summary: [JSF2.0] Dependent project's JSF 2.0 taglib namespace is not recognized by Eclipse
Product: [WebTools] Java Server Faces Reporter: Behrang Saeedzadeh <hello>
Component: UIAssignee: Cameron Bateman <cameron.bateman>
Status: ASSIGNED --- QA Contact:
Severity: enhancement    
Priority: P4 CC: bjoern_weinbrenner, erik.reuter, raghunathan.srinivasan, thatnitind
Version: unspecified   
Target Milestone: Future   
Hardware: Macintosh   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:

Description Behrang Saeedzadeh CLA 2010-06-26 23:46:55 EDT
Build Identifier: 20100617-1415

I have a project named "TestComp" in which I am building a JSF 2.0 custom component. TestComp defines a namespace for the taglib named "http://testcomp.com". I have another project named "TestJSF" that is a JSF 2.0 Dynamic Web 3.0 Project that depends on the TestComp project.

In other words, TestComp is added as a required project to the Java Build Path of TestJSF. Also, TestComp is added to the Web Deployment Assembly of TestJSF.

There's a web page in TestJSF that imports the "http://testcomp.com" namespace and uses the TestComp component. When running the project on Tomcat 7 everything works fine. However, in Eclipse a warning line is placed under xmlns:tc="http://testcomp.com" and Eclipse doesn't recognize the TestComp component in the page: <tc:testcomp... />.

However had I written the classes of TestComp in the TestJSF project and added the testcomp.taglib.xml to the WEB-INF of the TestJSF project instead of the META-INF of TestComp, Eclipse had no problem recognizing the namespace.

Reproducible: Always

Steps to Reproduce:
1. Create a project (Project1) that defines a JSF 2.0 custom component with a namespace like "http://foo.com"
2. Create a Dynamic Web 3.0 Project (Project2) with JSF 2.0 Facet and Mojarra libraries
3. Add Project1 to the build path of Project2
4. Add Project1 to the Web Deployment Assembly of Project 2
5. Create a Facelets XHTML page and try to import http://foo.com

6. Eclipse cannot recognize http://foo.com while the project works fine when deployed to Tomcat 7
Comment 1 Nitin Dahyabhai CLA 2010-06-28 09:27:08 EDT
Is the part of the Java Build Path where the "http://foo.com" component is defined enabled on the 'Order and Export' tab of the 'Java Build Path' property page of Project1?
Comment 2 Behrang Saeedzadeh CLA 2010-06-28 09:37:47 EDT
(In reply to comment #1)
> Is the part of the Java Build Path where the "http://foo.com" component is
> defined enabled on the 'Order and Export' tab of the 'Java Build Path' property
> page of Project1?

Yes, the namespace is defined inside src/META-INF/mytaglib.taglib.xml and the src folder is already selected by Eclipse in the Order and Export tab of the Java Build Path for the project. In fact, its checkbox is checked with a dash mark and it cannot be unchecked.
Comment 3 Cameron Bateman CLA 2010-10-11 17:46:49 EDT
Target for maintenance release.
Comment 4 Erik Reuter CLA 2011-03-24 17:50:40 EDT
This problem haunts me as well, developing a custom facelet taglib.

However, I did discover a workaround, which is not ideal, but is suitable for the users of the taglib I'm developing:

What i noticed is that tag completion works fine for e.g. PrimeFaces, which is a packaged jar added to the build path.

Tried packaging my taglib and added it to build path.. Everything works, just like with Primefaces.
Comment 5 Raghunathan Srinivasan CLA 2011-03-28 19:29:19 EDT
For review
Comment 6 Ian Trimble CLA 2011-04-11 19:52:43 EDT
After some research, it has been discovered that this requires significant work, and now (approaching M7) is not the time for this. Pushing out to a future release.
Comment 7 Raghunathan Srinivasan CLA 2012-02-01 13:22:30 EST
We may not be able to get to this in Juno
Comment 8 Raghunathan Srinivasan CLA 2012-05-31 13:57:51 EDT
Mass update: Moving Target to Juno SR1 release as we are in ramp down phase for Juno.
Comment 9 Raghunathan Srinivasan CLA 2012-09-06 14:17:58 EDT
Triage: Consider fro 3.5
Comment 10 Cameron Bateman CLA 2013-04-19 17:22:06 EDT
This is too large to take on for 3.5.  Since there is (or at least was) user interest, I suggest that we target this for SR1.