This content has been marked as final.
Show 4 replies
-
1. Re: problems with {facesContext.externalContext.request.contextPath}
blabno Mar 1, 2010 2:14 PM (in response to nimo22)h:outputText just renders your text. I bet image might append contextPath if value you specify does not start with slash. What is your contextPath ? How about #{request.contextPath} ?
-
2. Re: problems with {facesContext.externalContext.request.contextPath}
nimo22 Mar 1, 2010 7:32 PM (in response to nimo22)hello,
this:
<h:graphicImage value="/#{request.contextPath}/img/myImg.jpg"/>
renders this:
/myPage//myPage/resources/img/tracktuning.jpg
this:
<h:graphicImage value="#{request.contextPath}/img/myImg.jpg"/>
renders this:
/myPage/myPage/resources/img/tracktuning.jpg
.
this:
<h:ouputText value="#{request.contextPath}"/>
renders this:
/myPage
.
Why is that so ???
-
3. Re: problems with {facesContext.externalContext.request.contextPath}
nimo22 Mar 1, 2010 7:38 PM (in response to nimo22)forget my last post (copy paste failure..):
look at that:
this:
<h:graphicImage value="/#{request.contextPath}/img/myImg.jpg"/>
renders this
/myPage//myPage/resources/img/myImg.jpg
this:
<h:graphicImage value="#{request.contextPath}/img/myImg.jpg"/>
renders this:
/myPage/myPage/resources/img/myImg.jpg
this:
<h:ouputText value="#{request.contextPath}"/>
renders this:
/myPage
.
Why is that so??
-
4. Re: problems with {facesContext.externalContext.request.contextPath}
haneef.haneef.kassam.gmail.com Mar 18, 2010 7:16 PM (in response to nimo22)I think SEAM will automatically prepend the context path (so in your case, myPage) to the URL of a graphic image, but will not do this for output text/links. Seems that's just the way it works.