1 / 24

Developing JSF Project With WebSphere

WELCOME. Developing JSF Project With WebSphere. hagin@tai.com.tr. Creating Project. Starting Point File > New > Other…. Selecting Project Type. From the Project Panel, choose Web Item In the right pane, some project types will appear, choose “ Dynamic Web Project ” Click Next button.

Download Presentation

Developing JSF Project With WebSphere

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. WELCOME Developing JSF Project With WebSphere hagin@tai.com.tr

  2. CreatingProject • Starting Point • File>New>Other…

  3. Selecting Project Type • From the Project Panel, choose Web Item • In the right pane, some project types will appear, choose “Dynamic Web Project” • Click Next button

  4. Determining Project Name And Location • Choose a unique project name • Choose a location for project files • Check configure advanced option box • Lastly, click Next

  5. J2EE Settings • Choose an EAR project to store the Dynamic Web Projectin it • Choose a Context Root name which construct the fully qualified name with the server address • Choose a J2EE specification level where the Dynamic Web Project will obey

  6. Creating EAR Project • Choose a unique name which will store the Dynamic Web Project • Choose a location for EAR project • Choose a server where the EAR project will be deployed in

  7. Adding Supports For Project • Add supports selected in the right figure for your Dynamic Web Project • Don’t add Struts Support, otherwise you will have trouble

  8. Selecting A Template Page • Do not choose a template page • Click finish • In the Dialog Box, click No • The creation process of a JSF Project is finished.

  9. Configuring Project Properties • In the project Navigation Pane, There are two project: JSFTutorial and JSFTutorialEAR • Right click on the JSFTutorial and select properties item

  10. Configuring Java Build Path • In properties editor, select Java Build Path Item • In the Order And Export Tab, push Select All button

  11. Configuring Project References • In properties editor, select Project References Item • In the References List, select JSFTutorialEAR

  12. Adding JSF Features To Project • In properties editor, select Web Project Features Item • In the Feature Pane, check out 2 faces component • Push OK button

  13. Default Properties of Faces Configuration File • The picture shows default Faces properties in the file of faces-config.xml.

  14. Default Properties Of Web.xml • Web.xml file should consists the Faces configurations in the region pointed by the red lines.

  15. Creating A Java Package • Move mouse on to Java Resources directory and right click • Go on with “New>>Package”

  16. Entering Package Name • Enter the package name guessnumber and click the Finish button

  17. Creating Managed Beans • Create a java package named as pagecode • Add UserNumberBean.java under guessnumber package from Resources directory • Add PageCodeBase.java under pagecode package from Resources directory • UserNumberBean should extends PageCodeBase class

  18. Creating JSP Files • Right click on Web Content directory and select New and JSP File, successively • By this way, create the below files: • index.jsp • greeting.jsp • response.jsp

  19. Determining JSP File Names • Enter the JSP file name and do not touch other properties • Click finish button • By this way, create the below files: • index.jsp • greeting.jsp • response.jsp

  20. Constructing Navigation Rules • The right figure explains navigation rules between jsp files in faces-config.xml • The first rule indicates that when greeting.jsp returns success, the response.jsp will be loaded • The second rule indicates that when response.jsp returns success, the greeting.jsp will be loaded response.jsp: <h:commandButton id="back" value="Back" action="success"/> greeting.jsp: <h:commandButton id="submit" action="success" value="Submit" />

  21. Initializing Managed Beans • Managed-bean declaration identifies following properties of UserNumberBean in faces-config.xml • class definition is guessnumber.UserNumberBean • Scope is Session • Minimum property’s type is integer and default value is 0 • Maximum property’s type is integer and default value is 10

  22. Running Project On Server • Point mouse on the root directory of the project JSFTutorial • Left click and choose Run on Server…

  23. Creating An Application Server • Check out Create a new Server box • Finally, click the finish button • JSFTutorial project will run on Application Server…

  24. Finish Thanks… Halil AGIN hagin@tai.com.tr

More Related