References files such as stylesheets and formatting pages.

<dsp:link [rel="file-type"]
  {href="file-path" | page="file-path"}
  [dynamic attributes]



Describes the item that is referenced; for example:



Specifies the MIME type that represents the referenced page. The MIME type must be a recognized MIME type, supported by the MIMETyper and MIMETypeDispatcher components.


Sets the page’s path and file name in two ways:


Path and file name. Resolves relative paths using the current page as a starting point. Resolves absolute paths using the Web application root as a starting point by prepending the request object’s context root to the specified value.


Contains the title as it appears on the referenced page.

dynamic attributes

Include additional attributes as needed for the output that your JSP will generate. This tag will pass the attributes into the corresponding output tag. The names of the attributes you include are not validated by the dsp tag library.

Usage Notes

dsp:link lets you reference files such as stylesheets and formatting pages and makes them available to the parent page in much the same way as the HTML link tag.

Note: dsp:link uses the iclass attribute in place of the cascading stylesheet class attribute to avoid using a Java reserved word in Java code.


<dsp:link rel="stylesheet"
  title="Jefferson High School StyleSheet"/>

This example creates a link from the current page to a stylesheet called style.css that is located in the same directory. The linked page uses the standard MIMETYPE for stylesheets (text/css) and is titled Jefferson High School Stylesheet.