Newbie: CSS not taking effect

2009-07-31 Thread Roman Sokolyuk
Hi, I built a few XHTML pages for a personal website and added style with CSS. In a browser everything looks great. I converted the pages into JSP's and the style no longer registers. Here is the JSP markup: home.jsp %@ include file=header1.jsp % titleMy Site:

Re: Newbie: CSS not taking effect

2009-07-31 Thread André Warnier
Roman Sokolyuk wrote: ... header2.jsp -- link href=../../CSS/style1.css rel=stylesheet type=text/css/ ... The CSS directory is under the app context, alongside WEB-INF. Am I specifying the path to the CSS correctly? Anyone can suggest what else I may be doing wrong?

Re: Newbie: CSS not taking effect

2009-07-31 Thread Roman Sokolyuk
Thank you very much for your time. This fixed the problem. I have only one question. How does the browser determine which parts of the URL to strip? On Fri, Jul 31, 2009 at 11:07 AM, André Warnier a...@ice-sa.com wrote: Roman Sokolyuk wrote: ... header2.jsp -- link

Re: Newbie: CSS not taking effect

2009-07-31 Thread André Warnier
As an addendum : A very useful tool when dealing with issues like this one, if your are using Firefox as a browser, is an add-on like HttpFox. It allows you to access your server, and see exactly which requests are sent to the server (including the secondary ones like your stylesheet and

Re: Newbie: CSS not taking effect

2009-07-31 Thread Roman Sokolyuk
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)? 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

Re: Newbie: CSS not taking effect

2009-07-31 Thread Konstantin Kolinko
2009/7/31 Roman Sokolyuk romsok.t...@gmail.com: I have only one question. How does the browser determine which parts of the URL to strip? http://tools.ietf.org/html/rfc3986#section-5 http://www.w3.org/TR/html401/struct/links.html#h-12.4.1 Also, if I remember correctly, unless you remove this

Re: Newbie: CSS not taking effect

2009-07-31 Thread André Warnier
Roman Sokolyuk wrote: Thank you very much for your time. This fixed the problem. I have only one question. How does the browser determine which parts of the URL to strip? It has very precise rules for that, which are probably to be found in the HTTP RFC

Re: Newbie: CSS not taking effect

2009-07-31 Thread Hassan Schroeder
On Fri, Jul 31, 2009 at 8:17 AM, Roman Sokolyukromsok.t...@gmail.com 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)? Yes. Is there a way to use

Re: Newbie: CSS not taking effect

2009-07-31 Thread André Warnier
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)? Is there a way to use CSS and images from within WEB-INf so that a client wouldn't be

Re: Newbie: CSS not taking effect

2009-07-31 Thread David Smith
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

Re: Newbie: CSS not taking effect

2009-07-31 Thread David Smith
André Warnier wrote: As an addendum : A very useful tool when dealing with issues like this one, if your are using Firefox as a browser, is an add-on like HttpFox. It allows you to access your server, and see exactly which requests are sent to the server (including the secondary ones like

Re: Newbie: CSS not taking effect

2009-07-31 Thread David Smith
Roman Sokolyuk wrote: Thank you very much for your time. This fixed the problem. I have only one question. How does the browser determine which parts of the URL to strip? On Fri, Jul 31, 2009 at 11:07 AM, André Warnier a...@ice-sa.com wrote: One way to handle the paths in jsps is to

Re: Newbie: CSS not taking effect

2009-07-31 Thread Hassan Schroeder
On Fri, Jul 31, 2009 at 9:19 AM, David Smithd...@cornell.edu wrote: One way to handle the paths in jsps is to use something like ${pageContext.request.contextPath}/webapp_relative_path/to_my_resource.css. OTOH, if you use the standard taglib to wrap all your urls, e.g. a href=c:url