How to Create an Application Workspace

Getting Started with ADF Faces 2-3 6. In the Name Your Project page, you can optionally change the name and location for your Java project. By default, the necessary libraries and metadata files for Java EE are already added to your data model project. Click Next. 7. In the Configure Java Settings page, optionally change the package name, Java source path, and output directory for your model layer. Click Next.

8. Configure the EJB settings as needed. For help on this page, click Help or press F1.

Click Finish.

2.2.2 What Happens When You Create an Application Workspace

When you create an application workspace using the Java EE Web Application template, JDeveloper creates a project named Model that will contain all the source files related to the business services in your application. JDeveloper automatically adds the libraries needed for your EJB project. For example, if you kept the default EJB settings, JDeveloper adds the EJB 3.0 library. JDeveloper also creates a project named ViewController that will contain all the source files for your ADF Faces view layer. JDeveloper automatically creates the JSF and ADF configuration files needed for the application. Additionally, JDeveloper adds the following libraries to your view project: ■ JSF 1.2 ■ JSTL 1.2 ■ JSP Runtime The ADF Faces and other runtime libraries are added when you create a JSF page in your project. Once the projects are created for you, you can rename them. Figure 2–1 shows the workspace for a new Java EE Web application. 2-4 Web User Interface Developers Guide for Oracle Application Development Framework Figure 2–1 New Workspace for an ADF Application JDeveloper also sets configuration parameters in the configuration files based on the options chosen when you created the application. In the web.xml file, these are configurations needed to run a JSF application settings specific to ADF Faces are added when you create a JSF page with ADF Faces components. Example 2–1 shows the web.xml file generated by JDeveloper when you create a new Java EE application. Example 2–1 Generated web.xml File ?xml version = 1.0 encoding = UTF-8? web-app xmlns:xsi=http:www.w3.org2001XMLSchema-instance xsi:schemaLocation=http:java.sun.comxmlnsjavaee http:java.sun.comxmlnsjavaeeweb-app_2_5.xsd version=2.5 xmlns=http:java.sun.comxmlnsjavaee descriptionEmpty web.xml file for Web Applicationdescription servlet servlet-nameFaces Servletservlet-name servlet-classjavax.faces.webapp.FacesServletservlet-class load-on-startup1load-on-startup servlet servlet-mapping servlet-nameFaces Servletservlet-name url-patternfacesurl-pattern servlet-mapping web-app