The BaseServer marks which host name and path we want to proxy. We can configure the server with the parameters domainName and path.
The domain name this server should be proxying to, it can include a port.
Will mark the path on the server we are mapping to.
Mark if absolute links matching this server should be rewritten.
<server className="net.sf.j2ep.servers.BaseServer" domainName="www.nytimes.com" isRewriting="true"> <rule className="net.sf.j2ep.rules.DirectoryRule" directory="/news" /> </server>
The RoundRobinCluster contains numerous servers and will choose which server to proxy to separate for each request in a round-robin fashion. If a server starts a session the proxy will make sure that when a request is made to the server, with the same session id, the server that created the session is the one that will receive the request.
There are multiple servers objects in the RoundRobinCluster, each of them have the following parameters
The domain name that can include a port this server should be proxying to
Will mark the path on the server we are mapping to.
<cluster-server className="net.sf.j2ep.servers.RoundRobinCluster"> <server domainName="internal1.company.com" path="/somepath" /> <server domainName="internal2.company.com" path="/otherpath" /> <rule className="net.sf.j2ep.rules.DirectoryRule" directory="/cluster" /> </cluster-server>
Note that the RoundRobinCluster uses the element cluster-server instead of the normal server.