This content has been marked as final.
Show 2 replies
-
1. Re: How do I access the Context Path of the Web App?
sjmenden Sep 1, 2006 1:29 PM (in response to sjmenden)I just found this:
#{facesContext.externalContext.requestContextPath}
Is there any other way? -
2. Re: How do I access the Context Path of the Web App?
mzeijen Sep 1, 2006 1:59 PM (in response to sjmenden)Use the #{facesContext.externalContext.requestContextPath} to set the base url like this:
<base href="http://localhost:8080#{facesContext.externalContext.requestContextPath}/"
The only thing wrong in this example is the http://localhost:8080. This also should come from a variable. I haven't looked into that yet.
With the base tag in you head of the application you only have to refer to your images on a relative way:<link href="include/css/screen.css" rel="stylesheet" type="text/css" />