Can not find the tag library descriptor for "http://richfaces.ajax4jsf.org/rich" - eclipse

I've been trying migrating my project from JSF 1.0 and RichFaces 3.1.4 to JSF 2.2 and RichFaces 4.5.2.
I want to keep the pages JSP formatted (is it even possible?)
While replacing the jars of RichFaces I get the following error:
Can not find the tag library descriptor for "http://richfaces.ajax4jsf.org/rich"
What is the cause to this error?

JSP is deprecated since JSF 2.0. It's succeeded by Facelets (XHTML). Therefore, JSF 2.0 compatible component libraries like RichFaces 4+ and PrimeFaces 2+ do not support JSP anymore. Those component libraries do not contain JSP taglibs anymore. Hence this error.
Migrate JSP to its successor Facelets.
See also:
Migrating from JSF 1.2 to JSF 2.0
Why Facelets is preferred over JSP as the view definition language from JSF2.0 onwards?

Related

JavaServer Faces 2.0 requires Dynamic Web Module 2.5 or newer

I'm using Maven with WTP support in Eclipse. I've configured Project Facets to use Dynamic Web Module 3.0, Java 1.7 and JSF 2.1. Still I'm getting this error, under problems tab.
JavaServer Faces 2.0 requires Dynamic Web Module 2.5 or newer.
Could you guys point me in the right direction?
UPDATE:
Deleted the markers and the errors did not re-appear. Thanks! :)
when you remove the markers particular the JavaServer Faces 2.2 checkbox meaning it won't be selected or loaded in the IDE config.
I believe it will not use that particular component.

impossible add Icefaces 3 facet in Eclipse 3.7?

I am trying add Icefaces 3 facet but it is not work correctly, I have created a maven project (WTP=2.0) by maven command, the I have add JSF2,Java 1.6 and Javascript by Eclipse project facet, but when I try to add ICefaces 3 facet then Eclipse not working.
I add .XHTML extension in JSP editor and it work fine if I create a ICefaces project.
I don´t upload images, sorry, this is a link: http://www.flickr.com/photos/75492946#N02/6785053594/
In the image above, I press OK button and nothing happens, Icefaces 3 faces doesn´t add.
Otherwise, I download M2Eclipse and I have created a maven project, I followed the same steps above, and everything is fine until I try to add ICefaces 3 facet, with the same result for me.
I can write tag ui autocomplete bacause JSF2 nature add correctly, but I dont write autocomplete tags ace/ice
Finally, I could create a Icefaces project but this is not desired by me, because I need a Maven project within Icefaces 3 nature.
any suggestions?
Kinds regards.
==================================================================================
Finally!! I have resolved this problem. It is a very easy solution but I had overlooked. When You need to add Dynamic Web Module facet you must set Content directory: /src/main/webapp/
In this way the project preserver standard maven structure y then you could add JSF2 and Icefaces3 facet without problem.
Now, You can create *.xhtml file and autocomplete Icefaces,JSF2 and facelets tags.
Edit: The real conflict is the web.xml, it must be version=3.0, only in this way you can do the above steps.
ICefaces 3 releases note say: This release includes the Mojarra JSF 2.1.4 runtime libraries. Mojarra 2.1.4 introduces a hard depedency on Servlet 3.0 APIs, as a result, it cannot be used on older JEE5 application servers. Mojarra 2.1.3, or Apache MyFaces 2.1.6 should be used in on older JEE5 servers instead.
In my case I use Mojarra 2.1.3 and the web.mxl is version=2.5, but it conflict because ICefaces 3 eclipse facet somehow related Mojarra 2.14 and web.xml version=3.0
The final solution addition to the above is to user web.xml version=3.0 and libraries provided by Icefaces3 plugin.
If you start your project as an ICEFaces project, you can convert it to be a Maven project also after it is created.
Right click the project in your explorer
Select Configure > Convert to Maven project
This has worked for me in the past when I have needed a project to use Maven and other plugins at the same time.

what are the minimal JSF jars needed to deploy a JSF app with Tomcat

I know that a minimal API is 4 jars, I remember facelets*.jar.
What are the minimal JSF jars needed to deploy a JSF app with Tomcat?
Just use the JAR files which are provided/required by the JSF implementation you choose to use. Just download the implementation and read their own installation/users guide if you don't actually need more JAR files (as dependencies).
As of now there are only two major JSF implementations: Mojarra and MyFaces. The number of JAR files may vary per implementation and even version. Ultimately you need to make sure that you have both the JSF API and JSF implementation (which may exist of 2 or even 1 JAR file, depending on impl/version). MyFaces requires more commons-*.jar dependencies while Mojarra doesn't require any additional dependencies.
Since JSF 2.0, Facelets is bundled with the JSF implementation and has replaced JSP as default view technology.
See also:
Our JSF wiki page
These two are enough to start a simple web app using JSF 2.1 with tomcat 7.
javax.faces-2.1.14.jar
and
jstl-1.1.0.jar
You can run a JSF application with tomcat by either including Mojarra libraries or by including jars.
1. To include Mojarra libraries,
While creating an JSF application, it asks for JSF implementation library. Select option 'User library' and then click on 'Download library' option as shown in the below image.
It will then search for the libraries and show an option like below,
Select the mojarra library and then accept the "Terms and conditions" and click on "Finish".
2. Include below jars
Download JSF-API Jar http://central.maven.org/maven2/com/sun/faces/jsf-api/
Download JSF-IMPL Jar http://central.maven.org/maven2/com/sun/faces/jsf-impl/

Validator id is not registered

i am getting this warning in eclipse:
Validator id is not registered
on the line:
<f:validator validatorId="confirmPasswordValidator" />
i am using JSF 2, and tomcat 6
and my el-impl library is org.glassfish.web
any ideas why ?
and how to solve it ?
Ignore and run it. Eclipse is relying on it being present as <validator> declaration in faces-config.xml the JSF 1.x way. It does by default not recognize #FacesValidator and likes yet and therefore don't see it already being registered by new JSF 2.x annotations. The upcoming newer Eclipse versions will.
You could consider to turn off JSF validation in Eclipse preferences, it will only lead to more confusion and annoyances. The upcoming JBoss Tools plugin 3.3 (currently still in beta) will support JSF annotations like #FacesValidator, #ManagedBean, etc.
Note that this is in no way related to EL. You aren't using #{} anywhere.

How to Get JSF 2.0 Working with Eclipse 3.5 and JBoss 5.1

I am running Eclipse 3.5 and JBoss 5.1. I want to create a JSF 2.0 project.
I heard here that the Eclipse JBoss Tools plugin version 3.1 (available here) could do this for me.
I have installed the plugin. However, if I go to the Project Facets properties page for a Dynamic Web Project, I only see Facets for JavaServer Faces 1.1 and 1.2. My Java facet is set at 6.0, and my Dynamic Web Module to 2.5.
In the Targeted Runtimes properties page, I see that I am targeting the JBoss 5.1 Runtime.
I understand that Eclipse Helios will be here next week, but I'm curious if its possible to get JSF 2.0 working with 3.5. Any thoughts?
Certainly you can. Just set to 1.2, give the JSF 2.0 libraries and it will work. It's after all just the code which you write. You'll maybe only miss the IDE assistance in JSF 2.0 specific features, but this doesn't harm if you know how to write code yourself. Heck, you can even do this all using plain notepad.exe and javac.exe ;)
See also:
Does the Eclipse IDE support JSF 2.0?