Add this to components.xml:
| <factory name="hostname"
value="#{facesContext.externalContext.request.servername}"
scope="<APPROPRIATE_SCOPE>"/>
|
(This is from memory. Check javadoc.).
Then you can use hostname in el expressions with facelets:
| <c:if test="#{hostname == 'www.mydomain.com'">
| blah
| </c:dif>
|
Or you can inject the hostname into your components:
| @Name("test)
| pulic class test {
|
| @In private String hostname;
|
| // getters and setters
|
| }
|
Regards
Felix
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4035332#4035332
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4035332
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user