Hi Daryl,
Changing stripes:link wouldn't be enough (and inappropriate
probably) because CSSs are not the only static resources in general
webapps
--
There might be a better way, but I always define 'ctxt' variable in
my include-prelude jsp file:
<c:set var="ctxt" value="${pageContext.request.contextPath}" />
and use it as a prefix for referencing static resources.
<link rel="stylesheet" href="${ctxt}/static/css/mainStyle.css"
media="screen" type="text/css" />
<script type="text/javascript"
src="${ctxt}/static/script/myjs.js"></script>
<img src="${ctxt}/static/image/myimg.jpg" />
--
# It seems that <a> tag has a 'type' attribute.
http://www.w3.org/TR/html401/struct/links.html#h-12.2
Hope this helps,
Iwao
on 09/09/12 3:02 Daryl Handley said the following:
> I'm using stripes:link to generate anchor tags for my links, but I am
> wondering if I can also use it to generate links for javascript and css ?
>
> Ex:
>
> I have currently in my jsp
>
> <link rel="stylesheet" href="<c:url value='/static/css/mainStyle.css'/>"
> media="screen" type="text/css" />
>
> in order to add the context path to the url. Which I find ugly. I was
> hoping to be able to do something like
>
> <stripes:link rel="stylesheet" href="/static/css/mainStyle.css"
> type="text/css" />
>
> but it generates an anchor tag.
>
> Anything I can do to make this work how I want ? I noticed that
> stripes:link has a "type" attribute, but AFAIK html<a> tag does not, so
> I was hoping it would change to an html<link> tag when I set the "type"
> attribute.
>
> Daryl
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users