You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Renato Romano <r....@set-network.com> on 2004/02/19 15:12:40 UTC
Inclusion mechanism for JavaScript and Stylesheets
I'm sure this is a quite common issue, but I couldnt' find anything from
the archives; the question is: what is the best practice to include a js
file in a module independent way ? It seems html:rewrite will prepend
the module name, which is incorrect! I want to put those JavaScript
files in a common location;
The same question arises for the inclusion of a stylesheet.
Any help is very appreciated
Renato
____________________________________
Renato Romano
Sistemi e Telematica S.p.A.
Calata Grazie - Vial Al Molo Giano
16127 - GENOVA
e-mail: r.romano@set-network.com
Tel.: 010 2712603
_____________________________________
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: Inclusion mechanism for JavaScript and Stylesheets
Posted by Joe Germuska <Jo...@Germuska.com>.
At 3:12 PM +0100 2/19/04, Renato Romano wrote:
>I'm sure this is a quite common issue, but I couldnt' find anything from
>the archives; the question is: what is the best practice to include a js
>file in a module independent way ? It seems html:rewrite will prepend
>the module name, which is incorrect! I want to put those JavaScript
>files in a common location;
>The same question arises for the inclusion of a stylesheet.
>Any help is very appreciated
One way would be to use the JSTL <c:url> tag, which is ignorant of
Struts modules but which would prepend the app's context path.
In the nightly builds, work has been going on to make URL computation
more flexible with regards to modules. However, I think it's still
an open question as to the way to specify "no module at all" (see
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24235) -- and
perhaps you don't want to use nightly builds just to get this bit of
functionality.
Joe
--
Joe Germuska
Joe@Germuska.com
http://blog.germuska.com
"Imagine if every Thursday your shoes exploded if you tied them
the usual way. This happens to us all the time with computers, and
nobody thinks of complaining."
-- Jef Raskin
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org