I'm developing on a Mac OS 10.5.8
I have installed java 1.6 (soylatte) and it is correctly set :
java -version
java version "1.6.0_03-p3"
Java(TM) SE Runtime Environment (build 1.6.0_03-p3-landonf_19_aug_2008_14_55-b00)
I downloaded Eclipse Juno with the WTP stuffs.
I created a web app using JSP technology.
I'm thinking about doing the code modifications to use JSF technology.
So i downloaded Apache myFaces 2.1 jars and added them in my WEB-INF/lib directory.
The problem is that in the project properties / Project Faces section,
I don't have access to Java Server Faces checkbox.
What am I missing ?
[Edit] In response to BalusC comment.
In the "Project Faces" section from my project's properties, there is no checkbox with "Java Server Faces" displayed.
There are a lot of checkboxes (e.g. JPA, XDoclet, etc etc) but not JSF
Here are two good tutorials which walk you through the process of creating a JSF application using Eclipse:
Creating JavaServer Faces JSF application in Eclipse
How to make Eclipse IDE supports JSF 2.0
Your Java version 1.6 and Eclipse version (Juno, version 4) are correct. Since you clarified that JSF is not even present, my first instinct is that Eclipse cannot, for some reason, read the JSF jar files. A similar question was already asked here.
Related
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.
I am trying to figure out which jar I need to download for tomcat 7. I am making a call and passing an argument to a method such "availableEmployees(DepartmentName)" in my faces web page. This does not work in tomcat 7 but works in glassfish 3.1. I have added the javax.faces.2.1.20.jar "Mojarra" to my web app for jsf dependency. I have also javax.servlet.jsp.jstl.1.2.1 in my tomcat library folder.
Did anyone run into such problem ? Do I need to add more than the above jars for jsf support ? Thanks. Not using maven since it is somebody else' project.
I am using netbeans and I linked to an eclipse project. I added my own primefaces library. When I looked at the build output from netbeans, I have noticed that there were two copies of primefaces library. One with 3.4.2 and another with 3.3.1.
Removed one of them and everything worked.
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.
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.