How are the rest of you doing this?
we use:
rel="stylesheet" type="text/css">
in JSF EL we use instead:
#{facesContext.externalContext.requestContextPath}
and, finally, in javascript:
location.pathname == ('/' + location.pathname.split('/')[1]) ? "" : '/'
+ location.pathname.split('/
Hi Wayne,
I'm not shure about the 'best' way to solve this, but one of the easyest
is to provide a bean method for getting the contectPath.
public static String getContextPath() {
return
FacesContext.getCurrentInstance().getExternalContext().getRequestContextPath();
}
Put this in a ManagedBean
I had the same problem with images. It seemed to work some times and not
others, depending on the previous page path. I ended up using absolute paths
or ../../ . I get an empty string when I use anywhere, how
come?
> Subject: Getting the ContextPath to set stylesheet href properly
>
>
> Hi guys,
Here's the equivalent using "old" style JSP. This works! But I'd
prefer to make it work the "other" way.
<%@ page contentType="text/html; charset=utf-8" buffer="none"%>
<%@ taglib uri="http://java.sun.com/jsf/core"; prefix="f"%>
<%@ taglib uri="http://java.sun.com/jsf/html"; prefix="h"%>
<%@ tagli
I thought I should provide version info for all the pieces...
JDK 1.4.2
Oracle App Server 10g 10.1.2
J2EE 1.3
JSP 1.2
Servlets 2.3
EJB 2.0
MyFaces 1.1.0
Tomahawk 1.1.0
The next version of OAS 10g (10.1.3) will support
J2EE 1.4
JSP 2.0
Servlets 2.4
EJB 2.1 and 3.0
but of course its not out yet. Ju
5 matches
Mail list logo