[jboss-user] [JBoss Seam] - Re: including CSS and other html elements - context problem
onyii5119
do-not-reply at jboss.com
Sun Oct 7 10:41:31 EDT 2007
The way I handle it is to define an application path variable in a session scoped class as follows:
private String theAppPath;
then write the getter method for it:
public String getTheAppPath(){
request = (HttpServletRequest) FacesContext.getCurrentInstance().getExternalContext().getRequest();
theAppPath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+contextPath;
return theAppPath;
}
Then use value binding in my jsf facelet page as follows:
#{beanName.theAppPath}/css/cssFileName.css
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4092338#4092338
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4092338
More information about the jboss-user
mailing list