1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.ksb.server;
17
18 import org.apache.log4j.Logger;
19 import org.eclipse.jetty.server.Server;
20 import org.eclipse.jetty.webapp.WebAppContext;
21 import org.kuali.rice.core.api.config.property.ConfigContext;
22 import org.kuali.rice.ksb.BaseTestServer;
23
24 import java.net.URL;
25
26 public class TestClient1 extends BaseTestServer {
27
28 private static final Logger LOG = Logger.getLogger(TestClient1.class);
29
30 private static final String WEB_ROOT = "org/kuali/rice/ksb/testclient1";
31 private static final String CONTEXT = "/TestClient1";
32
33 @Override
34 protected Server createServer() {
35 Server server = new Server(new Integer(ConfigContext.getCurrentContextConfig().getProperty("ksb.client1.port")));
36 URL webRoot = getClass().getClassLoader().getResource(WEB_ROOT);
37 String location = webRoot.getPath();
38
39 LOG.debug("#####################################");
40 LOG.debug("#");
41 LOG.debug("# Starting Client1 using following web root " + location);
42 LOG.debug("#");
43 LOG.debug("#####################################");
44
45
46 WebAppContext context = new WebAppContext(location, CONTEXT);
47 server.setHandler(context);
48 return server;
49 }
50 }