Managing Folder Mappings

You are not constrained to store web application files in specific locations. In WebLogic Server, this feature is known as split development directory, documented at:  Creating a Split Development Directory Environment.

Understanding Folder Mappings

In order for the IDE to do error checking, code completion and application deployment, you must map your application folders into your project's standard web application structure. This can be done two ways:

The only restriction on location is that the folders to be mapped must be located within the current workspace, within a project.

Note that no folders are created in the project as a result of folder mappings. The project's Web Folder Mappings map existing folders to virtual locations that are used in the web application sources. So for example, you might map several folders to /images even though the folder /images does not actually exist in the source tree. Then your source files could contain references to /images (e.g., <img src="/images/logo.gif"/>) and Workshop would still be able to find the files.

Note also that subfolders of mapped folders are visible. For example, if you map /MyImages to the /images folder, the subfolders of /MyImages can be referenced by applications as if they were located inside /images.

Deploying Applications with Folder Mappings

If the app is not deployed on Weblogic Server 9.x or higher  then it is the application writer's responsibility to make sure that these virtual locations exist at runtime, typically by using a build script.

For Weblogic Server, Workshop automatically uses the Weblogic split development directory feature to deploy the application using the specified mappings for content files that are mapped to /. If content files are mapped to subfolders, the user must still provide a script to deploy files correctly.

Adding and Updating Folder Mappings

To add or update a folder mapping, right click on the project name in the AppXplorer view. Choose Properties from the pull-down menu. Click on Web Folder Mappings.

To add a mapping, click Add.

When adding a mapping:

 

Related tasks

Creating a new web application project
Importing existing web applications


Still need help? Post a question on the Workshop newsgroup.