Hi. I'm creating a Java web application and I'm facing the following problem. My JSP pages use CSS to specify my desired style (font, color, links ...) This application has login.jsp page , this page submits its form data to a servlet, if there is something wrong with the parameters, the servlet will forward the request to login.jsp in order to enter correct data. Here is the structure :
JSP pages uses the followingl line : <link href="../styles/web.css" rel="stylesheet" type="text/css" /> The problem is when login.jsp displayed for the first time, it displays the required effects of my CSS rules, but when it displayed again -through the forwarding process- it doesn't show the CSS effects. It shows the effects if I put the css file in the same dir -admin dir- and chaneged the link element. Well, I want to put my CSS files in a specific dir. Any ideas ?
This looked like a great way to have an absolute reference while still being able to run the JSP on a test server before going live with it. So I was quite dismayed when it didn't work. Fortunately there's a simple fix for the JSP 2.0 version: [Edited to disable smilies - PC2] [ December 28, 2005: Message edited by: Paul Clapham ]
Tomcat (what you are using, I assume) will only enable the EL by default on your JSP pages for 2.4 web apps. So yes, for 2.3 apps you will need to use scriplet expressions or confine your use of the EL to JSTL tags.