Return to site

Rapidweaver 8 1 – Create Template Based Websites Rapidly Using

broken image


Template Engines. By default Photish uses Slim as the template language. The templates can be in any format supported by Tilt.To use a different template language: Create a layout, collection, album and photo file in the site/templates folder, with the file extension of the template engine you prefer, supported extensions are documented by Tilt. .NET 1.1 and 2.0 Framework support: Integration Support Full integration with NCache for clustered object caching: 100% Visual Studio.NET 2003/2005 integration: Microsoft SQL Server 2005 native support: Database Support SQL Server 2000/2005 (thru OLEDB or native SQLClient) Oracle 8i/9i/10g (thru OLEDB or native OracleClient) DB2 7.x/8.1 (thru. Create template-based websites rapidly. Easily build eye-catching Web sites. Drag-and-drop website builder. Visual website creator. Visual web-design tool. New and Recently Updated. A flexible and powerful issue reader for GitHub.

The WebCenter Extension bundle provides tools for adding, managing, and securing content in a JSP application. Such tools include a declarative security tool; a life cycle management tool; and tools for consuming portlets, WebCenter services, and content. All of these are designed to enable you to better organize your information around the task at hand. After following a few preparatory procedures, you can use these tools to simplify the creation of WebCenter applications and projects.

This chapter steps you through the process of installing the WebCenter Extension bundle and getting started on WebCenter and portlet applications.

This chapter includes the following sections:

3.1 Installing the WebCenter Extension Bundle

The WebCenter extension bundle is a JDeveloper add-in that provides all WebCenter capabilities to the JDeveloper Studio Edition. To create a custom WebCenter application, you must first install the WebCenter extension bundle in an instance of Oracle JDeveloper Studio Edition.

To install the WebCenter extension bundle:

  1. Start Oracle JDeveloper.

  2. If the Select Default Roles dialog displays, select Default Role to enable all technologies, and click OK.

  3. If a dialog opens asking if you want to migrate settings from an earlier version, click No.

  4. From the Help menu, select Check for Updates.

  5. Click Next in the Welcome page of the Check for Updates wizard.

  6. On the Source page, under Search Update Centers, search for the WebCenter extension, select it, then click Finish.

  7. When prompted, restart JDeveloper.

JDeveloper is now configured to create WebCenter and portlet applications.

For more information on obtaining and installing Oracle WebCenter Framework, see the Oracle WebCenter page on OTN at:

3.2 Creating a WebCenter Application

To readily find and use WebCenter components in your application, you must ensure that the right technology scopes are set and tag libraries added. Once you do this, relevant tags are included in the Component Palette and relevant context menus become available in JDeveloper. The easiest way to ensure that scopes are set properly and the right tag libraries are added is to create your application using a template.

Oracle WebCenter provides two templates for creating applications:

  • WebCenter Application template—Prepopulates the application with projects optimally scaled for the creation of Java Content Repository (JCR) data controls and consumption of portlets and WebCenter Web 2.0 Services.

  • Portlet Producer Application template—Prepopulates the application with a project scoped for creation of JSR 168 (standards-based) and Oracle PDK-Java portlets.

It is not required that you use these templates. If you prefer, you can create your own WebCenter applications and portlet applications by manually scoping the application technologies and creating the relevant projects.

If you are working with an existing application that was created with some other template, you can also extend it with WebCenter components. To do this, you must manually add any required projects, technology scopes, and tag libraries. For information about extending existing applications, see Section 3.6, 'Extending Non-WebCenter Applications to Include WebCenter Capabilities.'

This section describes how to create an application using the WebCenter Application template.

Note:

Technology scopes control the options that appear by default in the New Gallery dialog. They can also be used to control the context menus that appear in JDeveloper and to add tag libraries to the project so that tags appear in the Component Palette.

3.2.1 How to Create a WebCenter Application Using a Template

The easiest way to ensure that the right tag libraries are included and the right technology scopes are set for a new WebCenter application is to create the application using the WebCenter Application template. Application templates provide a means of easily creating an application with a pre-defined set of projects and technology scopes. Templates also provide a means of partitioning an application into projects that reflect a logical separation of the overall work.

A project typically represents a group of related components that can be deployed into their own logical—and possibly physical—tier. You can deploy application projects to the same WebLogic Server instance on a single host or to different WebLogic Server instances, potentially running on different hosts.

The WebCenter Application template consists of a Model project for the data model and a ViewController project for consuming portlets, components, and data controls. The WebCenter Application template folds both of these projects into one application for simplicity, but you can arrange your applications and projects the way that best fits your circumstances. For example, if you are either the portlet developer or the application developer—but not both—then it is more likely that you would benefit from a separate application for the WebCenter application and for the portlets the application consumes.

To create an application using the WebCenter Application template:

  1. Access the application creation wizard in any of the following ways:

    • From the File menu, choose New. In the New Gallery dialog, expand Applications, select WebCenter Application, and click OK.

    • From the Application Navigator, select New Application.

    • If you have an existing application that is open, then in the Application Navigator, right-click and choose New. In the New Gallery dialog, expand Applications, select WebCenter Application, and click OK.

    • If you have an existing application that is open, then in the Application Navigator, from the drop down menu, select New Application.

  2. In the Name your application page of the creation wizard, enter a name for the application in the Application Name field.

  3. In the Directory field, enter a path to the directory where the application should be stored, or accept the default path.

    For example:

    Optionally, click the Browse button to navigate to the desired directory.

  4. If required, in the Application Package Prefix field, enter a prefix to use for packages created within this application.

  5. From the Application Template list in the creation wizard, select WebCenter Application. Perform this step only if you invoked the wizard by clicking New Application in the Application Navigator.

  6. Click OK.

    The template prepopulates the application with two projects:

    • Model, scoped for data modeling and content sourcing

    • ViewController, scoped for creation of WebCenter application pages and page elements and for registering portlet producers

  7. To create the new WebCenter application with the default settings for the two projects, click Finish.

    Alternatively, configure the projects according to your requirements by navigating through the remaining pages of the wizard. Then click Finish.

For more information about the projects and technology scope, see Section 3.2.2, 'What Happens When You Use the WebCenter Application Template.'

3.2.2 What Happens When You Use the WebCenter Application Template

Using the WebCenter Application template generates default projects with unique technology scopes, libraries, and default files. Additionally, it limits the types of options that are exposed in the JDeveloper user interface to those appropriate to the project type.

Note:

In addition to populating the application with default files and folders, the template populates the Resource Palette with the WebCenter Services Catalog. The WebCenter Services Catalog contains data controls and task flows that you can use to integrate Oracle WebCenter Services in your application. For more information, see Part III, 'Integrating, Presenting, and Publishing Content'.

This section provides an overview of what occurs when you use the WebCenter Application template. It includes the following subsections:

3.2.2.1 Template Projects, Technology Scopes, and Libraries

By default, the WebCenter Application template names its two projects Model and ViewController. If you prefer, you can rename the projects before or after you create the application. Rename projects before you create the application through the Manage Templates command on the Tools menu. Rename projects after you create the application through the Rename command on the File menu.

When you use the WebCenter Application template, JDeveloper does the following for you:

  • Creates Model and ViewController projects, each with their own relevant technology scopes and libraries.

    Table 3-1 lists the defaulttechnology scopes and libraries that are included with applications created with the WebCenter Application template. As you start building the application and adding components to the project, the list of libraries grows rapidly.

    Table 3-1 WebCenter Application Template Projects

    ProjectPurposeTechnology ScopesLibraries

    Model

    Use this project to define data controls that pull in content from selected data repositories.

    ADF Business Components

    Content Repository

    Java

    ADF Model Runtime

    BC4J Oracle Domains

    BC4J Runtime

    BC4J Security

    BC4J Tester

    MDS Runtime

    MDS Runtime Dependencies

    Oracle JDBC

    ViewController

    Use this project to build WebCenter application pages that consume portlets and contain your other WebCenter application components.

    You can also use the ViewController project as the starting point for registering portlet producers. Note, however, that portlet producers are created at the application level irrespective of the starting point from which they were created. For more information, see Section 34.2, 'Registering Portlet Producers with a Custom WebCenter Application.'

    ADF Faces

    ADF Page Flow

    HTML

    Instant Messaging and Presence (IMP) Service

    Java

    JSF

    JSP and Servlets

    Links Service

    Oracle Composer

    Portlet Bridge Service

    Portlet View

    Tag Service

    WebCenter Customizable Components

    XML

    Oracle Composer Tag Library

    JSF 1.2

    JSTL 1.2

    ADF Faces Runtime 11

    ADF Common Runtime

    WebCenter Customizable Components Tag Library

    ADF Page Flow Runtime

    ADF Controller Runtime

    ADF Controller Schema

    ADF Web Runtime

    MDS Runtime

    MDS Runtime Dependencies

    Commons Beanutils 1.6

    Commons Logging 1.0.4

    Commons Collections 3.1

    ADF DVT Faces Runtime

    JSP Runtime

    WebCenter Links Service Tag Library

    WebCenter Tagging Service Tag Library

    WebCenter IM and Presence Service Tag Library

    WebCenter Content Templates Tag Library

    WebCenter Content Repository View Components

    WebCenter Smart Tag

    ADF Common Web Runtime


    When you work in each project, the New Gallery is filtered to show only choices that are relevant to the selected technologies. For example, the option to create a Content Repository data control is available in the New Gallery while the Model project is selected, but that option is not available while the ViewController project is selected. Similarly, options for creating JSP pages are available while the ViewController project is selected, but those options are not available while the Model project is selected.

  • Creates a starter application deployment descriptor web.xml file with default settings. You will find the web.xml file in the Application Navigator under the ViewController project's WEB-INF folder. For more information about web.xml, see Section 3.2.2.2.2, 'The WebCenter Application Template Default web.xml File.'

  • Creates an empty faces-config.xml file in the ViewController project's WEB-INF folder. The faces-config.xml file is a JSF configuration file where JSF application resources, such as custom validators and managed beans, are registered and all page-to-page navigation rules are defined. For more information about faces-config.xml, see Section 3.2.2.2.3, 'The WebCenter Application Template Default faces-config.xml File.'

  • Adds jsf-impl.jar in the ViewController project's WEB-INFlib folder. This JAR file is the JSF reference implementation that JDeveloper includes by default.

  • Creates an empty adfc-config.xml file. This file can be used to set up routers to conditionally control flow between pages.

    See Oracle Fusion Middleware Fusion Developer's Guide for Oracle Application Development Framework for more information about ADF task flows.

3.2.2.2 WebCenter Application Template Default Files and Folders

When you use the WebCenter Application template to create an application, it creates a folder hierarchy with an accompanying set of default files. This section provides detailed information about default files and the file hierarchy. It contains the following subsections:

3.2.2.2.1The WebCenter Application Default Folder Hierarchy

Because there are several possible views of the Oracle JDeveloper Application Navigator, the hierarchy of folders in a WebCenter application may differ when you compare folders in the Application Navigator with the same folders in your file system. For example, Figure 3-1 illustrates one view of a newly created application in the Oracle JDeveloper Application Navigator.

Figure 3-1 Application from WebCenter Application Template in JDeveloper


Description of 'Figure 3-1 Application from WebCenter Application Template in JDeveloper'

Figure 3-2 illustrates the folder hierarchy of the same application in a Windows file system.

Figure 3-2 Application from WebCenter Application Template in a Windows File System


Rapidweaver 8 1 – create template based websites rapidly using multiple
Description of 'Figure 3-2 Application from WebCenter Application Template in a Windows File System'

If you prefer to view the Windows file system hierarchy in the Application Navigator, click the Navigator Display Options icon in the Projects panel and select Group by Directory.

3.2.2.2.2 The WebCenter Application Template Default web.xml File

Part of WebCenter application configuration is determined by the content of its J2EE application deployment descriptor file: web.xml. The web.xml file defines many application settings that are required by the application server.

Note:

Rather than being specified in web.xml, the context root path is assigned when the application is deployed.

Typical runtime settings include initialization parameters, custom tag library location, and security settings. Depending on the technology you use, other settings may be added to web.xml as appropriate.

Note:

For standard Java EE files like web.xml, there is usually a counterpart Oracle-specific file with additional Oracle-specific options, for example, weblogic.xml.

Example 3-1 illustrates the default web.xml file provided through the WebCenter Application template. This file is located in the /public_html/WEB-INF directory relative to the ADF application's ViewController project.

Example 3-1 Default web.xml File Provided Through the WebCenter Application Template

When you first create your WebCenter application, configuration settings for JSF servlet and mapping and for resource servlet and mapping are automatically added to the starter web.xml file.

The Faces Servlet entry inside tags (Example 3-1) provides information about the JSF servlet, javax.faces.webapp.FacesServlet. This servlet manages the request processing life cycle for web applications that use JSF to construct the user interface. The configuration setting maps the JSF servlet to a symbolic name, Faces Servlet.

The resources entry inside tags (Example 3-1) provides information about the ADF resource servlet used to serve up web application resources (images, style sheets, JavaScript libraries) by delegating to a ResourceLoader.

The tags map the URL pattern to a servlet's symbolic name. You can use either a path prefix or an extension suffix pattern.

By default, JDeveloper uses the path prefix /faces/*. That is, when a URL, for example, http://localhost:8080/SRDemo/faces/index.jsp, is issued, the URL activates the JSF servlet, which strips off the faces prefix and loads the file /SRDemo/index.jsp.

Note:

If you prefer to use the extension jsf for web pages instead of jsp or jspx, then you must set the javax.faces.DEFAULT_SUFFIX context parameter to jsf, for example:

Then add a servlet mapping in web.xml that invokes the JSP servlet for files with the extension jsf.

To edit web.xml in Oracle JDeveloper, right-click web.xml in the Application Navigator and choose Open from the context menu. This opens web.xml in the Web Application Deployment Descriptor editor, in Overview mode. If you are familiar with configuration element names, then you can also use the XML editor to modify web.xml.

For information about the configuration elements you can use in the web.xml file, see 'Oracle ADF XML Files' in the Oracle Fusion Middleware Fusion Developer's Guide for Oracle Application Development Framework.

3.2.2.2.3The WebCenter Application Template Default faces-config.xml File

Use the faces-config.xml file to register a WebCenter application's resources, such as custom validators and managed beans, and to define all page-to-page navigation rules. The default name this file is faces-config.xml, though this naming convention is not required.

Depending on how resources are packaged, an application can have one or multiple faces-config.xml files. For example, you can create individual JSF configuration files for:

  • Different areas of your application

  • Each library containing custom components or renderers

For more information about creating multiple faces-config.xml files, see Oracle Fusion Middleware Fusion Developer's Guide for Oracle Application Development Framework.

Example 3-2 illustrates the default faces-config.xml file provided through the WebCenter Application template. This file is located in the /public_html/WEB-INF directory relative to the ADF application's ViewController project.

Rapidweaver 8 1 – Create Template Based Websites Rapidly Using Multiple

Example 3-2 Default faces-config.xml File Provided Through the WebCenter Application Template

To edit the faces-config.xml file, double-click it in the Application Navigator. By default, the file is opened in the Editor window in Diagram mode, as indicated by the active Diagram tab at the bottom of the Editor window. When creating or modifying JSF navigation rules, Diagram mode enables you to visually create and manage page flows. For more information, see Oracle Fusion Middleware Fusion Developer's Guide for Oracle Application Development Framework.

To create or modify configuration elements other than navigation rules, use the Editor's Overview mode. Enter this mode by clicking the Overview tab at the bottom of the Editor window.

JSF allows multiple elements in a single faces-config.xml file. When you use the JSF Configuration Editor, you can edit only the first instance. For any other elements, you must edit the file directly using the XML editor. To use the XML editor, open the faces-config.xml file and go to the Source tab in the Editor window.

For reference information about the configuration elements you can use in the faces-config.xml file, see 'ADF Faces Configuration' in the Oracle Fusion Middleware Fusion Developer's Guide for Oracle Application Development Framework.

3.2.2.2.4 The WebCenter Application Template Default trinidad-config.xml File

The default trinidad-config.xml file, available when you create an application, contains information about the application skin family. Additionally, it can contain information about the level of page accessibility support, page animation, time zone, enhanced debugging output, and the URL for Oracle Help for the Web (OHW). Like faces-config.xml, the trinidad-config.xml file has a simple XML structure that enables you to define element properties using JSF Expression Language (EL) or static values.

Example 3-3 illustrates the default trinidad-config.xml file provided through the WebCenter Application template. This file is located in the /public_html/WEB-INF directory relative to the ADF application's ViewController project.

Example 3-3 Default trinidad-config.xml File Provided Through the WebCenter Application Template

Rapidweaver 8 1 – Create Template Based Websites Rapidly Using Word

In addition to the skin family, you can define the following application values in the trinidad-config.xml file:

  • Page animation

  • Level of page accessibility support

  • Time zone

  • Marsedit 4 0 7 download free. Enhanced debugging output

  • Oracle Help for the Web (OHW) URL

For reference information about the trinidad-config.xml file, see 'ADF Faces Configuration' in the Oracle Fusion Middleware Web User Interface Developer's Guide for Oracle Application Development Framework.

3.2.2.2.5 The WebCenter Application Template Default adfc-config.xml File

The adfc-config.xml file is the configuration file for an ADF unbounded task flow. This file contains metadata about the activities and control flows contained in the unbounded task flow. The default name for this file is adfc-config.xml, though this naming convention is not required.

If ADF Page Flow is specified as a Selected Technology on the Technology Scope page of the Project Properties dialog, a new adfc-config.xml source file is automatically created within the project. The adfc-config.xml file is the main source file for an unbounded task flow.

The adfc-config.xml file is located in the /public_html/WEB-INF directory relative to the ADF application's ViewController project.

Note:

If you do not plan to use task flows in your application, you can delete the adfc-config.xml file.

For more information about task flows and the adfc-config.xml file, see 'Oracle ADF XML Files' in the Oracle Fusion Middleware Fusion Developer's Guide for Oracle Application Development Framework.

3.3 Creating WebCenter Application-Enabled Pages

Create WebCenter application pages in JDeveloper as JSP documents (.jspx) rather than JSP pages (.jsp). For page customizations to be stored, the page must be represented in XML. By choosing to create an XML representation of the JSP document (.jspx), you ensure that customizations are always possible for the WebCenter application page.

If you are not planning to enable customization, you can create a JSP page; however this choice might cause problems if you later decide that you want to enable customization.

This section explains how to create WebCenter application-enabled pages. It contains the following subsections:

Note:

For detailed information about creating pages in JDeveloper with Oracle ADF, see the Oracle Fusion Middleware Web User Interface Developer's Guide for Oracle Application Development Framework. It contains all the information you need about Oracle ADF Faces and building basic and complex pages.

3.3.1 How to Create a Page in a WebCenter Application Based on a Template

When you create a WebCenter application using the WebCenter Application template, all the libraries necessary for adding WebCenter Web 2.0 Services and Composer components to your page are available by default. Additionally, runtime page customizations are enabled by default.

To create a customizable WebCenter application-enabled JSPX page:

  1. Start JDeveloper.

  2. In the Application Navigator, go to the ViewController project of the application in which you want to create a customizable page, right click the ViewController project, and choose New.

    Note:

    For information about how to create a WebCenter application if you have not yet created one, see Section 3.2, 'Creating a WebCenter Application.'
  3. In the New Gallery, expand Web Tier, select JSF and then JSF Page, and click OK.

  4. In the Create JSF Page dialog (Figure 3-3), enter a file name for the page.

    Figure 3-3 The Create JSF Page Dialog


    Description of 'Figure 3-3 The Create JSF Page Dialog'
  5. Select Create as XML Document (*.jspx) and click OK.

For information about the other settings in this dialog that are not specific to WebCenter-enabled pages, see the Oracle Fusion Middleware Web User Interface Developer's Guide for Oracle Application Development Framework.

3.3.2 How to Create a Page in a Manually-Created WebCenter Application

To create a JSPX page in a manually-created WebCenter application or non-WebCenter application, you must first add the necessary libraries to the page's home project. Adding the required libraries ensures that Web 2.0 Services and Oracle Composer component tag libraries are available in the Component Palette. You can then drag and drop components from these libraries onto your page.

Add the libraries specified in this section to enable page customization in the following types of applications:

  • A WebCenter application created manually rather than through a template. For more information, see Section 3.6, 'Extending Non-WebCenter Applications to Include WebCenter Capabilities.'

  • A non-WebCenter application that was created using no template or any template other than the WebCenter Application template.

To add the necessary libraries:

  1. Right-click your project and choose Project Properties from the context menu.

  2. In the left panel of the Project Properties dialog, click JSP Tag Libraries.

  3. Click Add.

  4. Add the following libraries, and click OK:

    • Oracle Composer 1.0

    • WebCenter Customizable Components Rich 11

    • Customizable Components (HTML) 11

    • WebCenter IM and Presence Tags 11.1.1.1.0

    • WebCenter Links Service 11.1.1.1.0

    • WebCenter Tagging 11.1.1.1.0

You can now create a WebCenter Application-enabled JSPX page by performing the steps in Section 3.3, 'Creating WebCenter Application-Enabled Pages.'

3.4 Creating a Portlet Application

Use portlets to provide controlled display of and access to local and remote content sources. You can create portlets as part of your application development effort when you create an application and project scoped for portlets. With the appropriate scoping in place, Oracle JDeveloper provides options that are tailored to creating portlets. For example, in an application scoped for portlets the Web Tier node appears in the New Gallery, and portlet creation is allowed.

Note:

Portlet applications are not automatically scoped for portlet producer registration. For information about registering a portlet producer, see Section 34.2, 'Registering Portlet Producers with a Custom WebCenter Application.'

You can scope an application and its projects for portlet creation in either of the following ways:

  • Use the Portlet Producer Application template

  • Extend an application by optimizing one of its projects for portlet creation

Notes:

Use separate applications to build and consume portlets. Building and consuming portlets within the same application can cause problems during packaging and deployment.

This section describes the steps to create a portlet application using the Portlet Producer Application template. It contains the following subsections:

For information about extending an existing application to enable portlet creation, see Section 3.6, 'Extending Non-WebCenter Applications to Include WebCenter Capabilities.'

3.4.1 How to Create a Portlet Application Using a Template

The Portlet Producer Application template consists of a single project, Portlets. Use the Portlets project to create JSR 168 (standards-based) and Oracle PDK-Java portlets.

To create an application using the Portlet Producer Application template:

  1. Access the application creation wizard in any of the following ways:

    • From the File menu, choose New. In the New Gallery dialog, expand Applications, select Portlet Producer Application, and click OK.

    • From the Application Navigator, select New Application.

    • If you have an application open, then in the Application Navigator open the application name drop down menu and select New Application.

    • In the Application Navigator, right-click the application name and choose New. In the New Gallery dialog, expand Applications, select Portlet Producer Application, and click OK.

  2. In the Name your application page of the creation wizard, enter a name for the application in the Application Name field.

  3. In the Directory field, accept the default path or enter a path to the directory where the application should be stored.

    For example:

    Optionally, click the Browse button to navigate to the desired directory.

  4. If required, in the Application Package Prefix field, enter a prefix to use for packages to be created within this application.

  5. From the Application Template list, select Portlet Producer Application.

    Note:

    The Application Template list appears only when you invoke the wizard by clicking New Application in the Application Navigator as described in step 1.
  6. Click Finish to create the portlet application with default project configurations.

3.4.2 What Happens When You Use a Portlet Producer Application Template

Using the Portlet Producer Application template generates the default Portlets project with the Java, JSP and Servlets, and Portlet technology scopes. It limits the types of options that are exposed in the JDeveloper user interface to those appropriate for creating portlets.

When you right-click this new project, options to create JSR 168 and Oracle PDK-Java portlets are provided.

3.5 Implementing Security in Your Application

The use of Oracle ADF security enables WebCenter applications to easily adjust to real-world business security requirements because, rather than securing paths, you secure actions with JAAS. JAAS-based Oracle ADF Security provides:

  • More granular security. Because Java EE security is URL-based or page-based, it is not possible to have a finer level of access control. With Oracle ADF security, different roles can perform different levels of activity at the same URL.

  • The ability to create new roles and their associated access privileges at runtime. This capability flows from the fact that policies storage is external to the application.

  • Simplified permission assignment through hierarchical roles, which enable the inheritance of permissions. While the roles used by Java EE security constraints are flat, JAAS permissions reference enterprise roles, which can be nested.

Note:

For details on how to implement a complete security solution for your custom application, see the section on enforcing ADF Security in a Fusion Web application in the Oracle Fusion Middleware Fusion Developer's Guide for Oracle Application Development Framework.

Some services must know the identity of the user. For example, for saving searches the Search service requires the user's identity. For these services, you must at least configure your application to authenticate users so that they have distinct identities for personalization and preferences. Such a security configuration is useful in testing how user privileges impact runtime customization capabilities.

This section covers the basic security configuration required to help in testing your application in Integrated WebLogic Server (WLS). It contains the following subsections:

3.5.1 How to Configure ADF Security

This section provides information about implementing a basic security solution.

To enforce Oracle ADF Security for the application:

  1. Open your application, and select the ViewController project.

  2. Access the Configure ADF Security Wizard using one of the following methods:

    • From the Application menu, select Secure and then Configure ADF Security.

    • Right-click the application name, select Secure and then Configure ADF Security.

  3. On the Enable ADF Security page, select ADF Authentication and Authorization, which is the typical choice for WebCenter applications.

    Figure 3-4 ADF Security Page of the ADF Security Wizard


    Description of 'Figure 3-4 ADF Security Page of the ADF Security Wizard'
  4. Click Next.

  5. Select the authentication type you want your application to use when users submit their login information.

    To make the process of securing your application easy, select Form-Based Authentication and then the Generate Default Pages option, as shown in Figure 3-5.

    Alternatively, if you do not select Generate Default Pages, you can create custom login and error pages. For information about creating custom login pages, see Chapter 37, 'Securing Your WebCenter Application.'

    Figure 3-5 Authentication Page of ADF Security Wizard


    Description of 'Figure 3-5 Authentication Page of ADF Security Wizard'
  6. Click Next.

  7. On the Enable automatic policy grants page, shown in Figure 3-6, select whether to make ADF resources public without requiring application developers to first define ADF policy grants. For a basic security implementation, you can select the No Automatic Grant option.

    However, in this case, you must individually grant permissions on each page in the application.

    Figure 3-6 Automatic Policy Grants Page


    Description of 'Figure 3-6 Automatic Policy Grants Page'

    When you enable automatic policy grants, a View grant is made to all members of the test-all application role. This option provides a convenient way to run and test application resources without the restricted access that ADF authorization enforces. You can also disable automatic policy grants to secure all ADF resources by default. For more information about the specific grants provided through task flows, see Section 4.1.3, 'Automated Task Flow Grants.'

    Select No Automatic Grant when you want to explicitly configure a policy store to grant access to ADF resources. No automatic grants to the test-all application role are granted. However when WebCenter Services task flows are consumed in an application, the WebCenter extension automatically adds appropriate grants for these task flows, giving View access to the role authenticated-role.

    Note:

    Grants made to the role authenticated-role are visible in the source view of the jazn-data.xml file. If the default grant to authenticated-role is not appropriate to the application, you can change it by manually updating the source view of the application's jazn-data.xml.

    Select Grant to Existing Objects Only when you want JDeveloper to grant View privileges to the test-all application role and you want this policy to apply to all your application's existing ADF task flows and web pages in the user interface project.

    Select Grant to All Objects when you want JDeveloper to grant View privileges to the test-all application role and you want this policy to apply to all ADF task flows and web pages that developers create in the user interface project. Note that the Grant to All Objects option appears when you run the wizard for the first time. Subsequently, the Grant to New Objects option appears each time you run the wizard.

  8. Click Next.

  9. Optionally, if you want to display a specific welcome page upon authentication, then select the Redirect Upon Successful Authentication option as shown in Figure 3-7.

    You can either create a custom welcome page or let the wizard create a default one. To keep the process simple, select Generate Default.

    For information about creating a custom welcome page, see Chapter 37, 'Securing Your WebCenter Application.'

    Figure 3-7 Specify an Authenticated Welcome Page


    Description of 'Figure 3-7 Specify an Authenticated Welcome Page'
  10. The Summary page opens, as shown in Figure 3-8.

    Figure 3-8 Summary Page


    Description of 'Figure 3-8 Summary Page'
  11. Click Finish.

    It may take several moments for the wizard to complete.

  12. On the Security Infrastructure Created dialog, click OK.

3.5.2 How to Create an Application Role

You can test your ADF Security settings by creating a role and a user, and giving the user privileges on your JSF page. Then, as you add services, you can use this user's credentials to test the service at runtime.

To create an application role:

  1. In the Application Resources panel, navigate to the jazn-data.xml file, which is available under the META-INF folder.

  2. Access the Edit JPS Identity and Policy Store dialog using any of the following methods:

    • Right-click jazn-data.xml and select Properties Securecrt 8 7 crack. from the context menu.

    • Right-click jazn-data.xml and select Open from the context menu. Click Application Roles on the page.

    • Right-click the application name, select Secure and then Users and Groups.

  3. In the Edit JPS Identity and Policy Store dialog, click Roles under the jazn.com realm and then click Add.

  4. In the Add Role dialog, enter a name for the role, for example, admin.

  5. Click OK, then click OK again.

    You have now created a sample role for testing purposes.

  6. Save the file.

Similarly, you can add users to the application by specifying the user name and password. For example, if you have a user named fmwadmin for your Discussions server, you may want to use the same user ID, so that this user can authenticate with the Discussions server. You can then associate this user with the admin role you created.

3.5.3 How to Add Login and Logout Links

You can add login and logout links to your public welcome page so that users can explicitly log in and out while they are in the application. For information about adding login and logout links, see the chapter titled 'Enforcing ADF Security in a Fusion Web application' in the Oracle Fusion Middleware Fusion Developer's Guide for Oracle Application Development Framework.

3.5.4 What Happens at Runtime

When you run the application, a login page is rendered. Subsequently, a welcome page is rendered for successfully-authenticated users, and an error message is rendered for users without the required privileges.

3.6 Extending Non-WebCenter Applications to Include WebCenter Capabilities

If your business requirement was to create a non-WebCenter application, say a Fusion web application, but you want to also include WebCenter capabilities in that application, you can do so by adding the required technology scopes and libraries. The technology scopes limit UI options to those appropriate to the type of application project you are building. The libraries provide the components and elements useful in constructing application content. You can extend an existing application to integrate content from various repositories, create portlets, or consume portlets and WebCenter Services. You can extend ADF applications from the current release or from a 10.1.x.x release.

The easiest way to understand what to specify for a WebCenter application or portlet application is to review the out-of-the-box template's characteristics. You can then mimic these in your own applications or templates.

While extending your application, you may decide to create projects that are optimized for specific WebCenter capabilities. This section steps you through the process of manually creating projects like those provided with the WebCenter templates and adding the required technology scopes and libraries to projects.

To enable WebCenter capabilities in an application:

  1. Open your application.

    Click Yes if you are prompted to migrate your application settings.

    Note:

    If you migrated a 10.1.3.x WebCenter application, then the application continues to have the Model, ViewController, and Portlets projects.
  2. Optionally, create new projects for defining the application data model, consuming content, or creating portlets:

    1. In the Application Navigator, right-click the application and select New Project from the context menu.

    2. In the New Gallery, expand General, select Projects, then Generic Project, and click OK.

    3. In the Create Generic Project wizard, in the Project Name field, enter a name for the project.

      For example View.

    4. In the Directory field, specify the directory path for storing the project or accept the default path.

    5. Click Finish to create the new project.

  3. Right-click a project and select Project Properties.

  4. Date format creator 1 3 – date format creator software. In the Project Properties dialog, add the required technologies and libraries depending on which WebCenter-related capabilities you want to enable in the selected project:

    • To define the application data model:

      Include the technologies and libraries listed against the Model project in Table 3-1.

    • To consume content:

      Include the technologies and libraries listed against the ViewController project in Table 3-1.

    • To create portlets:

      Include the WebCenter Portlet Creation Service technology.

  5. Save your work.

3.7 Creating a WebCenter Application Project By Importing a WAR File

This procedure is included in the event that you have an existing WAR file you want to import into your WebCenter application through JDeveloper.

Note:

Connection information is stored in the application-level EAR file and is not automatically imported with a project-level WAR file. Therefore, when you import a project-level WAR file, you must reconfigure any connections upon which the application relies.

To import a WAR file into JDeveloper:

  1. Right-click your application in the Application Navigator, and choose New Project from the context menu.

  2. In the New Gallery, expand General, select Projects, then Project from War File, and click OK.

  3. Follow the wizard instructions to complete creating the project.

  4. Right-click the newly created project in the Application Navigator, and select Project Properties from the context menu.

  5. Add the required technologies and libraries depending on which WebCenter-related capabilities you want to enable in the selected project.

    For information about required technologies and libraries, see Table 3-1.

  6. Click OK to close the Project Properties dialog.

3.8 Using Integrated WLS

Installation of Oracle WebCenter Framework reconfigures the Integrated WLS domain in JDeveloper to include additional libraries and several prebuilt portlets. This section discusses the Integrated WLS, including how to start and stop it, and describes some of the preconfigured portlet producers and prebuilt portlets it provides. It contains the following subsections:

3.8.1 How to Start and Stop Integrated WLS

Options for starting Integrated WLS are available in the Run menu in Oracle JDeveloper.

  • To start Integrated WLS in debug mode, select Debug Server Instance from the Run menu.

    Running the service in debug mode helps in debugging the service.

  • To start Integrated WLS in the regular mode, select Start Server Instance from the Run menu.

There are a couple of ways to determine if Integrated WLS is running:

  • From the View menu, select Log and look for the following entry:

  • Access the Integrated WLS console from a browser:

Note:

Sometimes WebLogic Server is not accessible (for example, if a user tries to restart WebLogic Server too quickly, before it has successfully shut down). In this case, you may have to manually shut down or stop the Java process.

3.8.2 What You May Need to Know About Integrated WLS

Integrated WebLogic Server (Integrated WLS) is a preconfigured WebLogic Server that provides a complete Java 2 Enterprise Edition (Java EE) 1.4-compliant environment. It is written entirely in Java and executes on the Java Virtual Machine (JVM) of the standard Java Development Kit (JDK). You can run WebLogic Server on the standard JDK provided with your operating system or the one provided with Oracle JDeveloper.

You can use Integrated WLS as a platform for pretesting WebCenter application deployments on your local computer by establishing an application server connection to it from Oracle JDeveloper. When you run the application in Integrated WLS, it is actually deployed as if you were deploying it to a WebLogic Server instance in an application server. For more information about Integrated WLS, see Section 38.3, 'Packaging and Deploying a Custom WebCenter Application to a WebLogic Managed Server.'

Note:

You can set the Java Virtual Machine (JVM) settings for a custom WebCenter application running on the Integrated WLS in the setDomainEnv.sh script located here:

The default memory values are:

When creating or referring to the JDEV_SYSTEM_DIRECTORY, keep in mind that, on a Windows platform, a WebCenter domain name cannot contain spaces, and the domain cannot be created in a folder that has a space in its path. Also, pages in custom WebCenter applications are not rendered if there is a space in the path to the system directory in Oracle JDeveloper. Therefore, ensure that DOMAIN_HOME and JDEV_SYSTEM_DIRECTORY paths do not contain spaces.

3.8.3 The WebCenter Preconfigured Server Readme File

The WebCenter Preconfigured Server Read Me file contains valuable information about how to use Integrated WLS. Additionally, it contains links to the preconfigured portlet producers. You can access the Preconfigured Server Read Me file by selecting WebCenter Preconfigured Server Readme from the Oracle JDeveloper Help menu.

3.8.4What You May Need to Know About Preconfigured Portlet Producers

The WebCenter preconfigured server provides a variety of ready-to-use portlets that you can add to your application pages. Simply register the producers contained in the default server with your WebCenter application, and then select the producers' portlets from Oracle JDeveloper's Application Resources panel.

This section provides a brief description of the preconfigured producers and some of the portlets they provide. It contains the following subsections:

For information about registering portlet producers, see Section 34.2, 'Registering Portlet Producers with a Custom WebCenter Application.' For information about adding portlets to pages, see Section 34.3, 'Adding Portlets to a Page.'

3.8.4.1 OmniPortlet and Web Clipping

The Integrated WLS contains PortalTools, whic provides access to the design time at runtime OmniPortlet and Web Clipping portlet. Design time at runtime means that users define portlet content after the portlet is placed on an application page and the page is run. This concept is explained more fully in Section 29.2.6, 'Portlet Creation Style.'

To access OmniPortlet and Web Clipping portlet producers:

  1. Start the Integrated WLS (see Section 3.8.1).

  2. From the Help menu, select WebCenter Preconfigured Server Readme.

  3. In the Readme file, go to the heading Preconfigured Portlet Producers, and click the PortalTools Welcome Page link under PortalTools Portlet Producers.

    This opens the PortalTools Welcome page.

  4. On the PortalTools Welcome page, copy the URL of the Web Clipping Producer link, the OmniPortlet Producer link, or the Sample Portlet Producer link, and use it as the producer URL in the Oracle PDK-Java Portlet Producer Registration Wizard.

    Note:

    For information about registering a portlet producer, see Section 34.2, 'Registering Portlet Producers with a Custom WebCenter Application.'

Once you have registered a producer, its portlets become available on Oracle JDeveloper's Application Resources panel. In the Application Resources panel, under the Connections node, select a producer name to list its portlets, then drag a portlet onto a WebCenter application page. (For information about adding portlets to pages, see Section 34.3, 'Adding Portlets to a Page.'.)

The PortalTools Welcome page contains producer URLs for three producers:

  • The Web Clipping producer provides the Web Clipping portlet, which is a browser-based declarative tool that enables dynamic reuse of content from another web source. When the source changes, the content in the Web Clipping portlet also changes. With the Web Clipping portlet, you use a web browser to navigate to the web page that contains the desired content. Using Web Clipping Studio, which is accessed through the portlet, drill down through a visual rendering of the target page to choose the desired content. For detailed information about the Web Clipping portlet, see Chapter 36, 'Creating Content-Based Portlets with Web Clipping.'

  • The OmniPortlet producer provides OmniPortlet, which is a declarative portlet-building tool that enables you to build portlets against a variety of data sources, including XML files, character-separated value files (for example, spreadsheets), web services, databases, web pages, and SAP data sources. OmniPortlet users can also choose a prebuilt layout for the data. Prebuilt layouts include tabular, news, bullet, form, chart, or HTML. For information about OmniPortlet, see Chapter 35, 'Creating Portlets with OmniPortlet.'

  • The Sample Portlet Producer is useful for illustrating the potential of an OmniPortlet. The sample producer is for demonstration and should not be used to create real-use portlet instances.

3.8.4.2 The WSRP Sample Portlet Producers and Portlets

The Integrated WLS includes sample WSRP portlet producers and portlets you can use with your application. For example, the WSRP WSDL URLs on the Rich Text Portlet Producer page include the Rich Text portlet, which offers browser-based rich text editing at runtime. To learn more about WSRP and the sample portlets, see Section 29.1.2.2, 'Rich Text Portlet' and Section 29.1.2.4, 'Parameter Form and Parameter Display Portlets.'

To access WSRP sample portlet producers:

  1. Start Integrated WLS (see Section 3.8.1).

  2. From the Help menu, select WebCenter Preconfigured Server Readme.

  3. In the Readme file, go to the heading Preconfigured Portlet Producers, and click the link for the Rich Text and Parameter Form Portlet Producer or Sample Portlets under WSRP Portlet Producers.

    Both links open different WSRP Producer Test Pages—one for different WSRP producer versions of the Rich Text portlet, the other for different WSRP producer versions of sample portlets.

  4. Copy the Web Services Description Language (WSDL) URL for a WSRP producer—either WSRP v1 WSDL or WSRP v2 WSDL.

    Use the copied link as the producer URL in the WSRP Producer Registration Wizard.

    Note:

    For information about registering a portlet producer, see Section 34.2, 'Registering Portlet Producers with a Custom WebCenter Application.'

Depending on where the portlet producer connection was registered, its portlets appear either under Application Resources or in the Resource Palette. From here, you can drag and drop a variety of sample portlets onto your WebCenter application pages.

3.8.4.3 The PDK-Java Sample Portlet Producer and Portlets

The Integrated WLS includes sample PDK-Java portlet producers and portlets you can use with your application. Use the PDK-Java sample portlets to familiarize yourself with the types of functionality that are available through PDK-Java portlets.

To access PDK-Java sample portlet producers:

  1. Start Integrated WLS (see Section 3.8.1).

  2. From the Help menu, select WebCenter Preconfigured Server Readme.

  3. In the Readme file, go to the heading Preconfigured Portlet Producers, and copy the link location for the PDK-Java Sample Producer or PDK-Java Struts Sample Producer link under PDK-Java Portlet producers.

    Use the copied link as the producer URL in the Oracle PDK-Java Portlet Producer Registration Wizard.

    Note:

    For information about registering a portlet producer, see Section 34.2, 'Registering Portlet Producers with a Custom WebCenter Application'.

Depending on where the portlet producer connection was registered, its portlets appear either under Application Resources or in the Resource Palette. From here, you can drag and drop a variety of sample portlets onto your WebCenter application pages.

3.9 Accessing Connection Wizards

To consume portlets and certain WebCenter Services in your application pages, you must first set up connections to portlet producers and various data source repositories. For example, the Documents service requires a Content Repository connection, and the Links service requires a Database connection.

This section describes the different ways to access the wizards for creating new connections. The actual steps to create the connections are discussed in their respective chapters in this guide.

Depending on how you invoke a wizard to create a connection, the connection is created in one of the following locations:

  • Under Application Resources in the Application Navigator

    Connections created here can be used in the current application only. This is the most common way to create a repository connection.

    For certain services, you can drag and drop a connection from Application Resources onto a page to create different types of task flow regions. To learn more, refer to the individual WebCenter service chapters.

  • Under IDE Connections in the Resource Palette

    Connections created here can be reused across WebCenter applications. To use these connections in an application, you just have to drag and drop the connection from the Resource Palette onto the Connections node in that application.

To access a connection wizard from the Application Navigator:

  1. Right-click the Connections node under Application Resources and select New Connection, then select the connection type from the context menu.

  2. Depending on your selection, the CreateConnection dialog or wizard opens.

    The Create Connection in option is set to Application Resources by default.

To access a connection wizard from the Resource Palette

  1. Click the New icon in the Resource Palette, select New Connection, then select the connection type from the context menu.

  2. Depending on your selection, the CreateConnection dialog or wizard opens.

    The Create Connection in option is set to IDE Connections by default.

You can also access a connection wizard from the New Gallery dialog. If you use this method, you must specify where to create the connection—under Application Resources or IDE Connections.

To access a connection wizard from the New Gallery:

  1. From the File menu, choose New.

  2. In the New Gallery dialog, expand Connections, select the type of connection you want to create, and click OK.

    Depending on your selection, the CreateConnection dialog opens.

  3. The Create Connection in option is set to Application Resources by default.

    You can select IDE Connections to create a connection in the Resource Palette.

See Also:

For information about creating and consuming connections:

3.10 Integrating Mobile Support

Application Development Framework Mobile (ADF Mobile) is a standards-based framework that enables the rapid development of enterprise mobile applications. You can implement mobile support for your WebCenter application just like you would for any other Oracle ADF application.

Because ADF Mobile is built upon the component model of Java Server Faces (JSF), you can quickly develop applications for PDA browsers. ADF Mobile's mobile-specific extensions to JSF enable you to develop mobile applications using the same methodologies for developing JSF applications for the desktop. For more information about ADF Mobile, see Oracle Fusion Middleware Mobile Browser Client Developer's Guide for Oracle Application Development Framework.

You also can build a mobile user interface using the APIs from various included products, such as Jive or UCM.

Note:

Currently, mobile support is not available for Oracle WebCenter Services.

A few weeks ago Joe Workman released Email for RapidWeaver — an amazing set of stacks that allow you to build responsive email templates directly inside of RapidWeaver.

It really is an amazing new way to design and build marketing emails. You no longer need to rely on pre-built templates or mess about with finicky online editors — you can build emails in the same way you build sites in RapidWeaver. Drag the stacks on to the page, add your content, and preview.

It's so good, we decided to record a training course dedicated to creating emails in RapidWeaver. We called it the RapidWeaver Email Course.

If you're quick you can get 25% off the regular price by using the coupon code save25 at checkout. This offer is limited to the first 25 customers, so hurry!

All the email templates you build with Email for RapidWeaver work great with every major email service, be it Mailchimp, Campaign Monitor, Sendy, or anything else.

If you want to learn how to build beautiful emails, pick up a copy of the RapidWeaver Email Course. You won't be disappointed.





broken image