From: <[EMAIL PROTECTED]>
The resulting href becomes the following by display the source page on IE.
<link rel="stylesheet" href="/css/screen.css" type="text/css"
media="screen, print" />
It is so strange that both http://localhost:8080/erp/
and http://localhost:8080/erp/addUserProfile.do
cannot display with css.
Not so strange, unless the stylesheet is in the ROOT context (assuming this
is standalone Tomcat). That leading slash means the browser is requesting
http://localhost:8080/css/screen.css.
Then I try to get the contextpath, instead of hard code.
But fail, the following line return null
<% String contextPath=request.getContextPath(); %>
<c:out value="${contextPath}"></c:out>
Why?
That fails because JSTL cannot "see" scripting variables. JSTL has an
implicit pageContext object, though which you can get to the request.
See if this does what you want:
<c:out value="${pageContext.request.contextPath}" />
I haven't tried it, but it looks like it should work.
--
Wendy Smoak
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]