You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Eric Jain <Er...@isb-sib.ch> on 2003/04/28 10:51:42 UTC

Can't create link to style sheet

How do I create a context relative link to a style sheet?

As we are using JSP XML syntax, the following won't work:

  <link
    href="<html:rewrite href="/shared/style.css" />"
    type="text/css" rel="stylesheet"
  />

Ideally, I'd expect something like the following to work, but it
doesn't:

  <html:link
    href="/shared/style.css"
    type="text/css" rel="stylesheet"
  />


Should the html:link tag be extended to recognize this case, and
generate a 'link' rather than an 'a' element, or is there a simpler way?


--
Eric Jain


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


RE: Can't create link to style sheet

Posted by Sachin Chowdhary <cs...@pisoftek.com>.
try this


use 
<head>
<html:base/>
        <LINK href="css/any.css" rel=stylesheet type="text/css">

</head>

-----Original Message-----
From: Eric Jain [mailto:Eric.Jain@isb-sib.ch]
Sent: Monday, April 28, 2003 2:22 PM
To: struts-user
Subject: Can't create link to style sheet


How do I create a context relative link to a style sheet?

As we are using JSP XML syntax, the following won't work:

  <link
    href="<html:rewrite href="/shared/style.css" />"
    type="text/css" rel="stylesheet"
  />

Ideally, I'd expect something like the following to work, but it
doesn't:

  <html:link
    href="/shared/style.css"
    type="text/css" rel="stylesheet"
  />


Should the html:link tag be extended to recognize this case, and
generate a 'link' rather than an 'a' element, or is there a simpler way?


--
Eric Jain


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


RE: Can't create link to style sheet

Posted by Andrew Hill <an...@gridnode.com>.
Perhaps you could use a base tag and a relative path to the stylesheet?

-----Original Message-----
From: Eric Jain [mailto:Eric.Jain@isb-sib.ch]
Sent: Monday, 28 April 2003 16:52
To: struts-user
Subject: Can't create link to style sheet


How do I create a context relative link to a style sheet?

As we are using JSP XML syntax, the following won't work:

  <link
    href="<html:rewrite href="/shared/style.css" />"
    type="text/css" rel="stylesheet"
  />

Ideally, I'd expect something like the following to work, but it
doesn't:

  <html:link
    href="/shared/style.css"
    type="text/css" rel="stylesheet"
  />


Should the html:link tag be extended to recognize this case, and
generate a 'link' rather than an 'a' element, or is there a simpler way?


--
Eric Jain


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org