tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Smith <d...@cornell.edu>
Subject Re: Newbie: CSS not taking effect
Date Fri, 31 Jul 2009 16:13:00 GMT

Roman Sokolyuk wrote:
> Additionally, does it follow that <img> elements have to refer to images
> located outside the WEB-INF directory (Since no content from WEB-INF can be
> served directly to the browser request)?
Simple answer: Yes.

More complicated: There are ways around this limitation using a servlet
to handle those requests and serve up the content.  The URL for the
resources would have to be something other than WEB-INF/resource. 
Download the tomcat source and take a look at the DefaultServlet class
as a beginning.

> Is there a way to use CSS and
> images from within WEB-INf so that a client wouldn't be able to get to them
> on its own?

See above.  Keep in mind the resources are requested in separate
requests from the pages that they are used on, so you'll have to inspect
headers and/or cookies to determine who can have them and who can't.

--David



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


Mime
View raw message