References files such as stylesheets and formatting pages.

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

Attributes

rel

Describes the item that is referenced; for example:

rel="stylesheet"

type

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.

href

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

page

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.

title

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.

Example

<dsp:link rel="stylesheet"
  type="text/css"
  href="Style.css"
  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.


Copyright © 1997, 2014 Oracle and/or its affiliates. All rights reserved. Legal Notices