Here are some miscellaneous thoughts on JSF 1.2.
The differences between JSF 1.2 and JSF 1.1 are not huge. Essentially the main differences are that you need to use objects called ValueExpressions instead of ValueBindings. Similarly you need to use MethodExpressions instead of MethodBindings. Also you will be using JSP 2.1 instead of 2.0. Also you need to use W3C XML Schema designations for your config files instead of DTD’s. Also I think you need to use a container that can handle Java EE stuff instead of J2EE stuff…but I am not sure about that. Also some classes have been deprecated in 1.2 that were in use in 1.1; for example, in the Tag Handler classes you would define for a custom component, you will not be inheriting from the UIComponentELTag instead of UIComponentTag.
You might take a look at (Vogel, L. (n.d.). JavaServer Faces 1.2 development with Eclipse WTP JSF Tooling - Tutorial. Retrieved from http://www.vogella.de/articles/JavaServerFaces/article.html) which shows how to get a project off the ground using JSF 1.2. I used Tomcat for my experiments. I would have liked to have also gotten it working with JDeveloper 11g since it uses a Java EE container. However I could not see an Enterprise Manager for the standalone 11g OC4J, and I did not want to learn how to use admin.jar, since that is how I supposed I would have to deploy to OC4J without EM working. Maybe now that 11g OC4J has gone into production now (I was still using a technical preview install) the EM will be in place…or maybe they are calling EM something else now…
Also Eclipse does not know how to talk to OC4J 11g yet. However it does know how to talk to Tomcat 6.0, which is compliant with JSF 1.2 and JSP 2.1 and Java EE and all that stuff. So I finally got Eclipse talking to Tomcat with all the right libraries. I put all the libraries needed in the build path and in the WEB-INF\lib path as well.
I also used Apache MyFaces JSF implementation. I think Apache Mojarra would have worked just as well, but again Eclipse may not know how to talk to GlassFish. I do not think it does. However if you want to use Apache Mojarra against other Java EE containers you are supposed to be able to do that. However, it appears to me that in order to actually deploy to any web server there is always a set libraries you need to include in order to be able to do this. It is not clear to me quite yet how to lay my hands always on this set of libraries, although I am thinking: probably the website of the app server in question…in the chapter on JSF perhaps?? Eclipse, if it knows how to deal with a server or a version of that server, will line up these magical libraries for the server if you specify what server you are using for a particular project. So if you are creating a new “Dynamic Web Project” of the JSF type, you can specify what server you want to deploy to (assuming you have set up Eclipse’s connection to your installation of whatever server you want to deploy to), and then those server-specific libraries will be lined up for you.
It looks like JSF 2.0 is in the works (ai yi yi!), so y’all better get it (and keep it) in gear!! J
2 comments:
Actually the integrated server inside JDeveloper 11g is not OC4J but rather WebLogic Server 10.3.
It does have a Web management console that comes with it.
And you can do the regular one click deploy and run/debug from inside JDeveloper 11g - so you might want to give the production version a try out.
Shay!
Thanks very much. I did not know you read my blog. That is nice to know.
Thank you very much for the information. That is good information. I did not realize that you integrated the weblogic container into your product already!
Post a Comment