JSF - Trinidad versus MyFaces - jsf

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.

Related

Which JAR files are needed to use JSF 2.2 on WebSphere 8.5

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

Packaging JSF web app with Quarkus with JVM mode

Quarkus JVM mode with JSF
I have an existing thorntail 2.4 based web application built using JSF and JEE (CDI/EJB).
For my technology stack above, if I am only using the JVM mode and not the native mode, is it possible to package my application using runtime?
I understand that EJB spec is not implemented with quarkus and I am OK with rewriting EJBs as CDI+JTA services but want to know if it's possible to use JSF with quarkus.
There is an extension for it available: https://github.com/tandraschko/quarkus-myfaces
UPDATE: I moved my 'personal' extension to MyFaces Core and we already have an 2.3-next-M1 release ready.
The showcase is available here and already uses the released version: https://github.com/apache/myfaces/tree/master/extensions/quarkus/showcase
UPDATE: We even released M2 today which supports native images!
Quarkus doesn't provide a JSF extension.
But it should be possible for your application to directly include a JSF implementation as a dependency and have it work

PrimeFaces 3.5 with WebSphere 6.1

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.

Does JSF 1.2 support JDK 1.5 and Servlets 2.4?

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.

Oracle ADF Faces application on Websphere 7.0

Can someone please help me out with the Oracle ADF faces application which I'm trying to deploy on Websphere 7.0? Do I need to apply any fixpacks on WAS? I'm trying to migrate this project from Websphere 6.1 to Websphere 7.0.
In Websphere 6.1, after removing jsf implementation jar files and providing them as part of WEB-INF\lib and changing the classloader to PARENT_LAST, the application was working fine.
For websphere 7.0, I can't seem to get the application working. It always picks up the Sun's JSF implementation. I've also tried the shared library concept but to no success.
Regards,
Zahir
The Oracle documentation lists a certification for WAS 7.0.0.13 ND. So you need FixPack 13 or later.
As the WebSphere Application Server 7 is a full blown JEE5 server it requires/has JSF 1.2 support. You can switch between the built in Sun and MyFaces implementation if required.
You should probably make sure that the ADF version you are using is certified for WAS 7. The ADF release notes tell that ADF supports JSF 2.0. The WAS 7 only comes with JSF 1.2. Exchanging the JSF version with placing the JSF 2 libs into WEB-INF/lib works well for our projects in conjunction with the 'PARENT_LAST' classloading policy. Make sure that you set the policy either for the whole application or for both the application and the web module.
ADF Faces is a Java based framework and it will run on WebSphere but, you have to add the required libraries first. The easiest way to prepare WebSphere to run ADF Faces application is through JDeveloper. Alternatively, you can google Oracle JRF (Java Runtime Framework) and install that on your WebSphere, before running the ADF Faces application.

Resources