CSS and Tiles
Hi all I have the following directory (partial shown) structure in my Struts/Tiles Web-app /webroot /webroot/jsp /webroot/layouts /webroot/styles the styles.css stylesheet is in styles and the layout is in ... not surprisingly, layouts What is the best way to get a reference for the CSS into my layout? Layout code follows - %@ page language=java% %@ taglib uri=http://jakarta.apache.org/struts/tags-html; prefix=html % %@ taglib uri=http://jakarta.apache.org/struts/tags-tiles; prefix=tiles % !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN link rel=stylesheet href=styles/style.css type=text/css CONTENT=no-cache html:html locale=true head html:base / titletiles:getAsString name=title //title /head body table border=1 width=600 cellspacing=5 class=arial10 tbody tr tdtiles:insert attribute=header //td /tr tr td height=80tiles:insert attribute=nav //td /tr tr tdtiles:insert attribute=body //td /tr tr td height=80tiles:insert attribute=footer //td /tr /tbody /table /body /html:html -- -- -Dave [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: CSS and Tiles
Hi Assuming I understood you correctly: I use webapplication absolute path with the JSTL core library's URL tag In my JSP: link rel=stylesheet type=text/css media=all href=c:url value=/styles/stylesheet.css// If you need to use a dynamic value for the stylesheets' name you could use the JSTL's expression language. -Henrik David Johnson [EMAIL PROTECTED] 02/28/2005 01:03 PM Please respond to Struts Users Mailing List To: Struts Users Mailing List user@struts.apache.org cc: Subject:CSS and Tiles Hi all I have the following directory (partial shown) structure in my Struts/Tiles Web-app /webroot /webroot/jsp /webroot/layouts /webroot/styles the styles.css stylesheet is in styles and the layout is in ... not surprisingly, layouts What is the best way to get a reference for the CSS into my layout? Layout code follows - %@ page language=java% %@ taglib uri=http://jakarta.apache.org/struts/tags-html; prefix=html % %@ taglib uri=http://jakarta.apache.org/struts/tags-tiles; prefix=tiles % !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN link rel=stylesheet href=styles/style.css type=text/css CONTENT=no-cache html:html locale=true head html:base / titletiles:getAsString name=title //title /head body table border=1 width=600 cellspacing=5 class=arial10 tbody tr tdtiles:insert attribute=header //td /tr tr td height=80tiles:insert attribute=nav //td /tr tr tdtiles:insert attribute=body //td /tr tr td height=80tiles:insert attribute=footer //td /tr /tbody /table /body /html:html -- -- -Dave [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: CSS and Tiles
nope, that's PERFECT. Thanks. I was planning to use link rel=stylesheet ref=html:rewrite page='/jsp/styles/style.css'/ type=text/css CONTENT=no-cache but this is a better alternative. Thanks! On Mon, 28 Feb 2005 13:40:08 -0600, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi Assuming I understood you correctly: I use webapplication absolute path with the JSTL core library's URL tag In my JSP: link rel=stylesheet type=text/css media=all href=c:url value=/styles/stylesheet.css// If you need to use a dynamic value for the stylesheets' name you could use the JSTL's expression language. -Henrik David Johnson [EMAIL PROTECTED] 02/28/2005 01:03 PM Please respond to Struts Users Mailing List To: Struts Users Mailing List user@struts.apache.org cc: Subject:CSS and Tiles Hi all I have the following directory (partial shown) structure in my Struts/Tiles Web-app /webroot /webroot/jsp /webroot/layouts /webroot/styles the styles.css stylesheet is in styles and the layout is in ... not surprisingly, layouts What is the best way to get a reference for the CSS into my layout? Layout code follows - %@ page language=java% %@ taglib uri=http://jakarta.apache.org/struts/tags-html; prefix=html % %@ taglib uri=http://jakarta.apache.org/struts/tags-tiles; prefix=tiles % !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN link rel=stylesheet href=styles/style.css type=text/css CONTENT=no-cache html:html locale=true head html:base / titletiles:getAsString name=title //title /head body table border=1 width=600 cellspacing=5 class=arial10 tbody tr tdtiles:insert attribute=header //td /tr tr td height=80tiles:insert attribute=nav //td /tr tr tdtiles:insert attribute=body //td /tr tr td height=80tiles:insert attribute=footer //td /tr /tbody /table /body /html:html -- -- -Dave [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- -Dave [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: CSS and Tiles
a follow up... what's the corresponding tablib element look like for the c.tld taglib? %@ taglib uri=http://jakarta.apache.org/struts/tags-html; prefix=html % On Mon, 28 Feb 2005 14:42:40 -0500, David Johnson [EMAIL PROTECTED] wrote: nope, that's PERFECT. Thanks. I was planning to use link rel=stylesheet ref=html:rewrite page='/jsp/styles/style.css'/ type=text/css CONTENT=no-cache but this is a better alternative. Thanks! On Mon, 28 Feb 2005 13:40:08 -0600, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi Assuming I understood you correctly: I use webapplication absolute path with the JSTL core library's URL tag In my JSP: link rel=stylesheet type=text/css media=all href=c:url value=/styles/stylesheet.css// If you need to use a dynamic value for the stylesheets' name you could use the JSTL's expression language. -Henrik David Johnson [EMAIL PROTECTED] 02/28/2005 01:03 PM Please respond to Struts Users Mailing List To: Struts Users Mailing List user@struts.apache.org cc: Subject:CSS and Tiles Hi all I have the following directory (partial shown) structure in my Struts/Tiles Web-app /webroot /webroot/jsp /webroot/layouts /webroot/styles the styles.css stylesheet is in styles and the layout is in ... not surprisingly, layouts What is the best way to get a reference for the CSS into my layout? Layout code follows - %@ page language=java% %@ taglib uri=http://jakarta.apache.org/struts/tags-html; prefix=html % %@ taglib uri=http://jakarta.apache.org/struts/tags-tiles; prefix=tiles % !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN link rel=stylesheet href=styles/style.css type=text/css CONTENT=no-cache html:html locale=true head html:base / titletiles:getAsString name=title //title /head body table border=1 width=600 cellspacing=5 class=arial10 tbody tr tdtiles:insert attribute=header //td /tr tr td height=80tiles:insert attribute=nav //td /tr tr tdtiles:insert attribute=body //td /tr tr td height=80tiles:insert attribute=footer //td /tr /tbody /table /body /html:html -- -- -Dave [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- -Dave [EMAIL PROTECTED] -- -Dave [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: CSS and Tiles
try this: href=%= request.getContextPath()%/styles/style.css Shed. -Original Message- From: David Johnson [mailto:[EMAIL PROTECTED] Sent: Monday, February 28, 2005 14:03 To: Struts Users Mailing List Subject: CSS and Tiles Hi all I have the following directory (partial shown) structure in my Struts/Tiles Web-app /webroot /webroot/jsp /webroot/layouts /webroot/styles the styles.css stylesheet is in styles and the layout is in ... not surprisingly, layouts What is the best way to get a reference for the CSS into my layout? Layout code follows - %@ page language=java% %@ taglib uri=http://jakarta.apache.org/struts/tags-html; prefix=html % %@ taglib uri=http://jakarta.apache.org/struts/tags-tiles; prefix=tiles % !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN link rel=stylesheet href=styles/style.css type=text/css CONTENT=no-cache html:html locale=true head html:base / titletiles:getAsString name=title //title /head body table border=1 width=600 cellspacing=5 class=arial10 tbody tr tdtiles:insert attribute=header //td /tr tr td height=80tiles:insert attribute=nav //td /tr tr tdtiles:insert attribute=body //td /tr tr td height=80tiles:insert attribute=footer //td /tr /tbody /table /body /html:html -- -- -Dave [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] smime.p7s Description: S/MIME cryptographic signature
Re: CSS and Tiles
Assuming you don't map it in web.xml, the default value is : http://java.sun.com/jstl/core It's defined in the c.tld taglib descriptor itself, see the uri sub element. -Henrik David Johnson [EMAIL PROTECTED] 02/28/2005 01:53 PM Please respond to Struts Users Mailing List To: Struts Users Mailing List user@struts.apache.org cc: Subject:Re: CSS and Tiles a follow up... what's the corresponding tablib element look like for the c.tld taglib? %@ taglib uri=http://jakarta.apache.org/struts/tags-html; prefix=html % On Mon, 28 Feb 2005 14:42:40 -0500, David Johnson [EMAIL PROTECTED] wrote: nope, that's PERFECT. Thanks. I was planning to use link rel=stylesheet ref=html:rewrite page='/jsp/styles/style.css'/ type=text/css CONTENT=no-cache but this is a better alternative. Thanks! On Mon, 28 Feb 2005 13:40:08 -0600, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi Assuming I understood you correctly: I use webapplication absolute path with the JSTL core library's URL tag In my JSP: link rel=stylesheet type=text/css media=all href=c:url value=/styles/stylesheet.css// If you need to use a dynamic value for the stylesheets' name you could use the JSTL's expression language. -Henrik David Johnson [EMAIL PROTECTED] 02/28/2005 01:03 PM Please respond to Struts Users Mailing List To: Struts Users Mailing List user@struts.apache.org cc: Subject:CSS and Tiles Hi all I have the following directory (partial shown) structure in my Struts/Tiles Web-app /webroot /webroot/jsp /webroot/layouts /webroot/styles the styles.css stylesheet is in styles and the layout is in ... not surprisingly, layouts What is the best way to get a reference for the CSS into my layout? Layout code follows - %@ page language=java% %@ taglib uri=http://jakarta.apache.org/struts/tags-html; prefix=html % %@ taglib uri=http://jakarta.apache.org/struts/tags-tiles; prefix=tiles % !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN link rel=stylesheet href=styles/style.css type=text/css CONTENT=no-cache html:html locale=true head html:base / titletiles:getAsString name=title //title /head body table border=1 width=600 cellspacing=5 class=arial10 tbody tr tdtiles:insert attribute=header //td /tr tr td height=80tiles:insert attribute=nav //td /tr tr tdtiles:insert attribute=body //td /tr tr td height=80tiles:insert attribute=footer //td /tr /tbody /table /body /html:html -- -- -Dave [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- -Dave [EMAIL PROTECTED] -- -Dave [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: CSS and Tiles
My final solution looks like this: link rel=stylesheet href='c:url value='/jsp/styles/style.css'/' type=text/css media=all/ Thanks all! On Mon, 28 Feb 2005 14:04:46 -0600, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Assuming you don't map it in web.xml, the default value is : http://java.sun.com/jstl/core It's defined in the c.tld taglib descriptor itself, see the uri sub element. -Henrik David Johnson [EMAIL PROTECTED] 02/28/2005 01:53 PM Please respond to Struts Users Mailing List To: Struts Users Mailing List user@struts.apache.org cc: Subject:Re: CSS and Tiles a follow up... what's the corresponding tablib element look like for the c.tld taglib? %@ taglib uri=http://jakarta.apache.org/struts/tags-html; prefix=html % On Mon, 28 Feb 2005 14:42:40 -0500, David Johnson [EMAIL PROTECTED] wrote: nope, that's PERFECT. Thanks. I was planning to use link rel=stylesheet ref=html:rewrite page='/jsp/styles/style.css'/ type=text/css CONTENT=no-cache but this is a better alternative. Thanks! On Mon, 28 Feb 2005 13:40:08 -0600, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi Assuming I understood you correctly: I use webapplication absolute path with the JSTL core library's URL tag In my JSP: link rel=stylesheet type=text/css media=all href=c:url value=/styles/stylesheet.css// If you need to use a dynamic value for the stylesheets' name you could use the JSTL's expression language. -Henrik David Johnson [EMAIL PROTECTED] 02/28/2005 01:03 PM Please respond to Struts Users Mailing List To: Struts Users Mailing List user@struts.apache.org cc: Subject:CSS and Tiles Hi all I have the following directory (partial shown) structure in my Struts/Tiles Web-app /webroot /webroot/jsp /webroot/layouts /webroot/styles the styles.css stylesheet is in styles and the layout is in ... not surprisingly, layouts What is the best way to get a reference for the CSS into my layout? Layout code follows - %@ page language=java% %@ taglib uri=http://jakarta.apache.org/struts/tags-html; prefix=html % %@ taglib uri=http://jakarta.apache.org/struts/tags-tiles; prefix=tiles % !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN link rel=stylesheet href=styles/style.css type=text/css CONTENT=no-cache html:html locale=true head html:base / titletiles:getAsString name=title //title /head body table border=1 width=600 cellspacing=5 class=arial10 tbody tr tdtiles:insert attribute=header //td /tr tr td height=80tiles:insert attribute=nav //td /tr tr tdtiles:insert attribute=body //td /tr tr td height=80tiles:insert attribute=footer //td /tr /tbody /table /body /html:html -- -- -Dave [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- -Dave [EMAIL PROTECTED] -- -Dave [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- -Dave [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: CSS and Tiles
Just be aware that c:url, like html:link, will encode/rewrite the URL (add session info) as needed. This may or may not cause problems when servicing the request. It should be fine to just do: link rel=stylesheet href=c:out value=${pageContext.request.contextPath}/styles/style.css}/ type=text/css media=all/ Quoting David Johnson [EMAIL PROTECTED]: My final solution looks like this: link rel=stylesheet href='c:url value='/jsp/styles/style.css'/' type=text/css media=all/ Thanks all! On Mon, 28 Feb 2005 14:04:46 -0600, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Assuming you don't map it in web.xml, the default value is : http://java.sun.com/jstl/core It's defined in the c.tld taglib descriptor itself, see the uri sub element. -Henrik David Johnson [EMAIL PROTECTED] 02/28/2005 01:53 PM Please respond to Struts Users Mailing List To: Struts Users Mailing List user@struts.apache.org cc: Subject:Re: CSS and Tiles a follow up... what's the corresponding tablib element look like for the c.tld taglib? %@ taglib uri=http://jakarta.apache.org/struts/tags-html; prefix=html % On Mon, 28 Feb 2005 14:42:40 -0500, David Johnson [EMAIL PROTECTED] wrote: nope, that's PERFECT. Thanks. I was planning to use link rel=stylesheet ref=html:rewrite page='/jsp/styles/style.css'/ type=text/css CONTENT=no-cache but this is a better alternative. Thanks! On Mon, 28 Feb 2005 13:40:08 -0600, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi Assuming I understood you correctly: I use webapplication absolute path with the JSTL core library's URL tag In my JSP: link rel=stylesheet type=text/css media=all href=c:url value=/styles/stylesheet.css// If you need to use a dynamic value for the stylesheets' name you could use the JSTL's expression language. -Henrik David Johnson [EMAIL PROTECTED] 02/28/2005 01:03 PM Please respond to Struts Users Mailing List To: Struts Users Mailing List user@struts.apache.org cc: Subject:CSS and Tiles Hi all I have the following directory (partial shown) structure in my Struts/Tiles Web-app /webroot /webroot/jsp /webroot/layouts /webroot/styles the styles.css stylesheet is in styles and the layout is in ... not surprisingly, layouts What is the best way to get a reference for the CSS into my layout? Layout code follows - %@ page language=java% %@ taglib uri=http://jakarta.apache.org/struts/tags-html; prefix=html % %@ taglib uri=http://jakarta.apache.org/struts/tags-tiles; prefix=tiles % !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN link rel=stylesheet href=styles/style.css type=text/css CONTENT=no-cache html:html locale=true head html:base / titletiles:getAsString name=title //title /head body table border=1 width=600 cellspacing=5 class=arial10 tbody tr tdtiles:insert attribute=header //td /tr tr td height=80tiles:insert attribute=nav //td /tr tr tdtiles:insert attribute=body //td /tr tr td height=80tiles:insert attribute=footer //td /tr /tbody /table /body /html:html -- -- -Dave [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- -Dave [EMAIL PROTECTED] -- -Dave [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- -Dave [EMAIL PROTECTED] -- Kris Schneider mailto:[EMAIL PROTECTED] D.O.Tech http://www.dotech.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: CSS and Tiles
I use the following to load my CSS files: link rel=stylesheet type=text/css href=sslext:rewrite forward='baseStyle'// Note: If you do not use sslext then use html:rewrite instead of sslext:rewrite. This method requires the path to the CSS file to be stored within the struts config file so it can be easily updated, i.e: forward name=baseStyle path=/assets/styles/global.css/. Hope that helps. Tim Christopher - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]