[jboss-user] [JBoss Seam] - Re: How do I access the Context Path of the Web App?

mzeijen do-not-reply at jboss.com
Fri Sep 1 13:59:35 EDT 2006


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" />

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3968976#3968976

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3968976



More information about the jboss-user mailing list