I have a problem with WebSphere 6.1 and Primefaces. I have created an application, but used a local Tomcat appserver for testing. Everything was working fine, until I tried to deploy it on WAS 6.1.
After investigating the internal server problem, I saw, that WAS 6.1 only supports JSF 1.1, so I can throw out the whole interface :S
My question is, what is the best and most importantly, the fastest solution for this:
my interface is very simple, only panels, commandbuttons, a menu and a printer component. Is it possible to go back to a previous version of primefaces that supports jsf 1.1 keeping most of the code? (as I read, primefaces 1.1 is the last, which is far away from 3.5 )
use another faces implementation, if yes which one is the easiest to switch to from primefaces
can WAS 6.1 be made somehow compatible with JSF 2?
any other way
It's possible if you drop the necessary JSF 2.0/2.1 + PrimeFaces 3.5 JARs in webapp's /WEB-INF/lib and set in WebSphere admin the classloader policy to PARENT_LAST on both the EAR and WAR. This will force WebSphere to load webapp-bundled JSF instead of its own bundled JSF.
Related
I am using WebSphere 8.5 which has a default implementation of JSF 2.0. I would like to use JSF 2.2. I was trying to find out which JAR files should I be getting to have my application use JSF 2.2?
For MyFaces, you'll want myfaces-impl and myfaces-api as well its runtime dependencies commons-beanutils, commons-collections, commons-digester, and commons-logging. For Mojarra, you'll just need jsf-api and jsf-impl.
Whichever implementation you use, make sure to follow the instructions for packaging third-party JSF implementations on WebSphere:
Configuring JavaServer Faces implementation
Can RichFaces (either 3.x or 4.x) and PrimeFaces (either 3.5 or 4.0) be used in the same JSF 2.x application? Will they coexist nicely?
My goal is migrating from RichFaces 3.x to PrimeFaces. I would like to start by using PrimeFaces for a new submodule of my web application, and eventually migrate everything.
It would be fairly easy to set up a simple hello-world sized project and try it out; I am asking here because I wish to know if there are some problems when doing this on real-life sized projects.
I understand that the Trinidad framework is an extension of MyFaces project (who is the JSF implementation). But, I have JSF project that has only the trinidad dependencies. So, I ask:
How works this project without the JSF implementation´s dependencies?
Thank you
Apparently the project which you've in hands is been targeted for deployment on a real Java EE application server.
Normally, JSF is already provided as part of the Java EE API by a decent Java EE application server such as Glassfish, JBoss AS, WebSphere, WebLogic, etc. The web application project does not need to include the JSF libraries at all (like as it does not ever need to include the JSP/Servlet/EJB/JPA/etc libraries when deployed to such a server).
However, in case of barebones JSP/Servlet containers like Tomcat and Jetty, JSF is not provided by the server itself. JSF has either to be manually installed in those containers or to be provided by the web application project itself.
JSF component libraries like Trinidad, PrimeFaces, RichFaces, etc are not part of the Java EE API and thus surely need to be supplied by the web application project itself.
I am currently developing a J2EE project using Servlets 2.4 and JSF 1.2. If I deploy my app in WebSphere 6.1, the page renders properly. If I deploy it in Tomcat 6.0 that uses JDK 1.5, the page doesn't render properly and show something like below:
<h:outputText value="#{msg.my_value}" />
I am just curious to know what is the root cause that cause the problem and it's just so interesting that it works in WebSphere and doesn't work in Tomcat although both of them are using JDK 1.5.
WebSphere as being a concrete Java EE application server ships with bundled JSF libraries, but Tomcat as being a simple JSP/Servlet container does not ship with any bundled JSF libraries. If you have paid close attention to your Tomcat server logs, then you should have noticed that there's a ClassNotFoundException on the FacesServlet which should already be enough hint as to the root cause of this problem.
You need to supply your own JSF implementation for Tomcat. This can be done by manually downloading the JSF libraries and placing them in either the /WEB-INF/lib folder of your webapp, or the /lib folder of the Tomcat installation. The latter will apply on all of its deployed webapps, like as happens in WebSphere.
I'm fairly new to JSF and Richfaces.
I'm looking to upgrade our system from JSF 1.1.2 to the latest 2.0. Also looking at upgrading our Richfaces 3.0 to 3.3
Under the lib folder for old projects we currently have the following:
ajax4jsf-1.1.1.1.jar
commons-beanutils-1.7.0.0.jar
commons-collections-3.3.1.0.jar
commons-digester-1.6.0.0.jar
commons-logging-1.1.1.0.jar
jsf-api-1.1.2.0.jar
jsf-facelets-1.1.12.0.jar
jsf-impl-1.1.2.0.jar
jstl-1.1.2.0.jar
richfaces-3.0.1.1.jar
This is what I have added:
richfaces-api-3.3.3.Final (Added)
richfaces-impl-3.3.3.Final (Added)
richfaces-ui-3.3.3.Final (Added)
So what I'm looking for is info on what Jars I can remove and what Jars I'm missing that need to be added.
Thanks
Hmm, before talking about the libs... What's your goal using jsf 2.0 and rf 3.3? I am asking because rf 3.3 does not really make use of jsf 2.0. As the jsf 2.0 roadmap for richfaces says
The goal of JSF 2.0 support in the 3.3.3 release is to run your existing RichFaces 3.3.X applications in a JSF 2.0/EE6 environment with little or no changes.
See this link: jsf 2.0 roadmap for richfaces
OK, back to your libs... I don't remember them by heart, but at least you should change jsf-api and jsf-impl to 2.x versions and drop the old stuff. I would have a look at a rf 3.3 demo project, what is contained there.
You can also just use RichFaces Maven archetype and create a project with everything you need.