Servers

BaseServer

The BaseServer marks which host name and path we want to proxy. We can configure the server with the parameters domainName and path.

Parameters

domainName

REQUIRED

The domain name this server should be proxying to, it can include a port.

path


Will mark the path on the server we are mapping to.

isRewriting

Default: false

Mark if absolute links matching this server should be rewritten.

Example

<server className="net.sf.j2ep.servers.BaseServer" domainName="www.nytimes.com" isRewriting="true"> <rule className="net.sf.j2ep.rules.DirectoryRule" directory="/news" /> </server>

RoundRobinCluster

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.

Parameters

There are multiple servers objects in the RoundRobinCluster, each of them have the following parameters

domainName

REQUIRED

The domain name that can include a port this server should be proxying to

path


Will mark the path on the server we are mapping to.

Example

<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.

SourceForge.net Logo