Managing links

There are several ways to manage links within and between Web projects and external files. You can manage the links manually or you can set preferences to control how links are managed when you edit, test, or publish a project. You can specify

To specify the default settings for all Web projects, select

Window | Preferences | Web Tools | Links

The initial default settings are as follows:

Important: Files must be in the WebContent folder for link validation to work correctly; links between files that are not in the WebContent folder will be deemed external or broken.

Broken links are displayed in the Problems list and are indicated by the icon in the first column.

When you select a preference that automatically copies files to your directory or displays the Broken links dialog, files that cannot contain links are copied or listed in the Broken links dialog. (One exception is CSS files, which can contain links to HTML and JSP files.)

HTML and JSP files are not automatically copied because they are likely to contain links to other external files. Copying them to a local directory likely would create more broken links.

If you need to link to other HTML files or JSP file outside of your project, you can reference them by mapping a drive to the system and directory where they are stored. Then set your Default Link Path preference to

Relative to the Document Root Directory. This way you can reference files that are already on your Web server without having the files locally.