[jboss-dev-forums] [Design of JBoss Portal] - Re: Virtual hosts and multiple portal server instances

julien@jboss.com do-not-reply at jboss.com
Sun Sep 3 17:32:48 EDT 2006


Hello Servker,

I am not really aware of how virtual host works. How can you from the HttpServletRequest get the virtual host ID ?

If you can then it is fairly easy to propose a different assembly of CommandFactory that setup the page according to that ID.

Let me explain quickly how that works : The CoreController of JBoss Portal is a service that delegates to a set of CommandFactory objects that need to return a ControllerCommand object.

Those different CommandFactory service are wired in jboss-portal.sar/META-INF/jboss-service.xml to form a chain of responsability (see correspoding GOF pattern).

By default we propose an assembly that form the default way JBoss Portal turns request into page views. It is possible to either form a different chain of responsability or develop custom CommandFactory to implement your own behavior.

In particular one command of the portal is called RenderPageCommand and it just trigger a page view.

I advise you to look at the javadoc or download the source code of the portal. If you need further help don't hesitate.

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

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



More information about the jboss-dev-forums mailing list