[jboss-user] [JBoss Seam] - Re: Multiple Domain Quesiton

fhh do-not-reply at jboss.com
Fri Apr 6 10:25:17 EDT 2007


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



More information about the jboss-user mailing list