develop a simple JSF web application with Eclipse and the Oracle Enterprise Pack for
Eclipse. Since this tutorial is targeted to WLS 10.3 there are some modifications to be made,
in order to run it with WLS12c and OEPE 12c. We take a brief look at the example itself and
point out the changes.
OEPE_JSF_Intro.pdf (93 KB)
http://weblogic-corner.blogspot.com 30.03.2012 16:38:00 OEPE_JSF_Intro.docx
OEPE JavaEE Lab Tutorial for JSF
We want to look at a simple tutorial from the Oracle web site which demonstrates how to develop a simple JSF web application with Eclipse and the Oracle Enterprise Pack for Eclipse. Since this tutorial is targeted to WLS 10.3 there are some modifications to be made, in order to run it with WLS12c and OEPE 12c. We take a brief look at the example itself and point out the changes.
1 Contents
OEPE JavaEE Lab Tutorial for JSF ........................................................................................... 1
1 Contents .............................................................................................................................. 1
2 The tutorial .......................................................................................................................... 1
3 The example Application .................................................................................................... 1
4 Modifications to the lab ...................................................................................................... 2
2 The tutorial
The tutorial can be found at
http://www.oracle.com/webfolder/technetwork/tutorials/obe/jdev/obe11jdev/11/oepe11g/introeclipseide .htm It contains just the description of the steps to execute the lab. No further source files are needed. We can run the lap with an installation of WLS12c which includes the OEPE. This tutorial guides the user trough the process of creating a Dynamic Web Application with Java Server Faces. It elaborates on creating bundle messages for internationalization and on creating page flow diagrams.
3 The example Application
The application itself is very simple. It is depicted in the following figure.
Figure 1. Structure of the JSF_Intro application.
There is web application that consists of three pages. The index.jspx contains a button that forwards to a register.jspx. Here the user can enter his name and email address. The data is stored in a java bean with session scope. The user then is forwarded to a welcome page which greets him with his name.
Seite 1/2
http://weblogic-corner.blogspot.com 30.03.2012 16:38:00 OEPE_JSF_Intro.docx
4 Modifications to the lab
The lab description is very detailed and contains the pictures of the dialogs, the user has to go through. We want to point out some required changes for WLS12c.
Problem: While editing the JSF-Page register.jspx, in the palette there are no JSF bars, JSF HTML is missing. Thus the HTML form cannot be wired to the UserBean.java.
Solution: In the Project Properties go to Project Facets->Java Server Faces->User Libraries. Click the Download Library Icon.Download and choose the following Library. /Users/uAries/Eclipse/workspace/libraries/JSF 1.2 (Mojarra JSF API Implementation 1.2_15-b01-FCS)
Problem: In register.jspx, in Step 23 (http://www.oracle.com/webfolder/technetwork/tutorials/obe/jdev/obe11jdev/11/oepe11g/introeclipseid e.htm#t5) There is no "New Navigation Case" Icon.
Solution: In the Project Explorer go to: JSF_Intro->Faces Configuration->Navigation Rules. Create a new Navigation Rule here instead and use the values from the tutorial.
Problem: (Adding Navigation Case to the Project, Step 1) Index.jsp is not using the properties given in application.properties.
Solution:
In Index.jspx change the properties from -> to
welcome.title -> welcomeTitle welcome.heading -> welcomeHeading welcome.message -> welcomeMessage
Problem: (Working with Bundle: Step 2)
Base name application.properties seems to be wrong
Solution:
Use the navigation button and choose resources.application
Problem: (Using AppXray Dependencies: Step 7) The AppXray diagramm does not show an error! However the error is visible in the index.jspx
Solution: Unknown.
Problem: JSF_Intro2 will not deploy.
Error:
Solution:
Project->Properties->Projects Facets->Java Server Faces->Type: User Library
Uncheck "Include libraries with this application"
Close and reopen the project.
Clean the serve.
<14.04.2012 18:45 Uhr MESZ> <Error> <javax.enterprise.resource.webcontainer.jsf.config> <BEA-000000> <Critical error during deployment:
com.sun.faces.config.ConfigurationException: java.util.concurrent.ExecutionException: javax.faces.FacesException: java.io.IOException: java.net.URISyntaxException: Illegal character in opaque part at index 42: zip:D:/11Eclipse/workspace02/libraries/JSF 2.0 (Mojarra 2.0.3-FCS)/mojarra-2.0.3- FCS/lib/jsf-impl.jar!/META-INF/mojarra_ext.taglib.xml
at com.sun.faces.config.ConfigManager.getConfigDocuments(ConfigManager.java:662)
at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:322)
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:225)
at weblogic.servlet.internal.EventsManager$FireContextListenerAction.run(EventsManager.java:582) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) Truncated. see log file for complete stacktrace
Seite 2/2
Keine Kommentare:
Kommentar veröffentlichen