tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alec Swan <aukcio...@yahoo.com>
Subject Re: Serving CSS files from a certain URL
Date Wed, 05 Jul 2006 16:56:55 GMT
I have a different perspective on using consistent environments across development and design
teams. I think it will be unreasonable to expect designers to change a CSS file, update the
WAR file and redeploy it on the local Tomcat instane just to see how CSS changes affected
the look of the site. Instead designers should be able to change CSS file and just preview
the JSP in the browser to see how the look of the JSP was affected.

Hassan Schroeder <hassan.schroeder@gmail.com> wrote: On 7/5/06, Alec Swan  wrote:
> In any case I don't understand why this works in your case.

Now that I have more coffee in me, me neither :-)  It really shouldn't, and
I'm at another location now, so I can't revisit that, but...

The problem is that "relative" to the container depends on how your JSP
is being invoked; consider:

 
  Test
  /WEB-INF/jsp/Test.jsp
 
 
  Test
  /test
 
 
  Test
  /foo/bar/test
  

The second mapping will work with your ../../css/Styles.css link, the
first will not.

> BTW, why do you think it's a bad idea to keep web designers focused on the look and feel
of the site and releaving them from the deployment details?

OT to the list -- but I think a development team should work within a
common (consistent) environment. Otherwise you wind up jumping
through the kind of hoops we're discussing now. :-)

In any case, if I *had* to solve this problem, I'd use the relative links
that work for your 'static' situation, and then either

1) serve all *.css files with a servlet that "fixes" the paths or
2) rewrite the css file paths with a Filter

HTH,
-- 
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org



Mime
  • Unnamed multipart/alternative (inline, 8-Bit, 0 bytes)
View raw message