Creating a project

A project is a set of resources that you define for a particular web application. Resources that make up a project could include XML or JSP files, layouts, themes, image policies, device policies, etc.

A project is a set of resources that you define for a particular web application. Resources that make up a project could include XML or JSP files, layouts, themes, image policies, device policies, etc.

MCS organizes resources according to project, so you can arrange for multiple projects to share the same policy repository.

In MCS, you use the New Project wizard to add a new project to the Workbench. The wizard allows you to define:

Naming the project

The first page in the wizard allows you to locate and name the project, and the location of the project contents.

  1. Choose File | New | MCS Project

  2. Enter a name in the Project name text box

  3. To choose a location other than your workspace, uncheck the Use default checkbox, and Browse to select a system folder in the Directory control

  4. Click Next

Note:

If you plan to import a project to a JDBC database, then the name of the project cannot be longer than 160 characters.

Defining project settings

On the next page you must enter values for the location of the project device repository file, name the source directory, and optionally enable collaborative working.

The device repository file can be any one on your system that is appropriate for this project. The repository filename extension is always .mdpr.

There can only be one policy source directory for a project, and all your MCS resources must be in this folder or one under it. The default path of the source directory is WebContent/mcs-policies, but you can use any name you wish.

Note:

Changing this directory location after you create a project may invalidate any existing policies.

Collaborative working requires the use of a JDBC policy repository and a specific user setting. See Enabling collaboration for more information on this step.

Note:

If an Oracle database is used to store policies, then you also need to specify the location of the Oracle driver file and restart MCS before you create your project. Refer to Project preferences for details.

  1. Use the Browse button to locate a Standard device repository file

  2. Enter a name in the Policy source directory control, or accept the default

  3. Click Finish

  4. In the Open Associated Perspective dialog, check Yes to ensure the MCS perspective is used to display this project. The new project icon appears in the Navigator pane.

  5. To view the project contents, select the icon and choose File | Refresh. Now expand the project.

Note:

If a database is used to store policies, you can control the speed of loading and refreshing local policies from the database. Refer to Project preferences for details.

Adding MCS resources to an existing project

You can add MCS resources to an existing Mobile Portal Toolkit project, such as a company web site, by adding a folder to your project. This will be your policy source directory. You do not have to create an MCS project.

  1. Choose an existing folder or right-click on a project folder and choose New | Folder. With a new folder you can use any name, but a name like 'MCS policies' will be meaningful.

  2. Now choose a policy wizard for the resource you want to add

  3. On the MCS settings page in the wizard click Browse to locate a device repository file for the project

  4. Continue with the wizard to complete adding the resource

MCS displays the resource icon in the new folder, and opens an editor on the resource.

Related topics