Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2010-05-13 11:33:15 +0000
committerEike Stepper2010-05-13 11:33:15 +0000
commit6ff104eeabae104a5bbe62c12b000212117d0abf (patch)
tree2ce5b75b249ebe9f7e9302c2391f74b4f7eb42a9 /plugins/org.eclipse.emf.cdo.examples.server
parentb34d0b2faf022d7be909027c3643d633ba007062 (diff)
downloadcdo-6ff104eeabae104a5bbe62c12b000212117d0abf.tar.gz
cdo-6ff104eeabae104a5bbe62c12b000212117d0abf.tar.xz
cdo-6ff104eeabae104a5bbe62c12b000212117d0abf.zip
vserver
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.examples.server')
-rw-r--r--plugins/org.eclipse.emf.cdo.examples.server/Demo Server.launch34
-rw-r--r--plugins/org.eclipse.emf.cdo.examples.server/src-gen/templates/ConfigOverview.java25
-rw-r--r--plugins/org.eclipse.emf.cdo.examples.server/src/org/eclipse/emf/cdo/examples/server/AbstractTemplateServlet.java6
-rw-r--r--plugins/org.eclipse.emf.cdo.examples.server/src/org/eclipse/emf/cdo/examples/server/ConfigOverviewServlet.java41
-rw-r--r--plugins/org.eclipse.emf.cdo.examples.server/src/org/eclipse/emf/cdo/examples/server/DemoConfiguration.java62
-rw-r--r--plugins/org.eclipse.emf.cdo.examples.server/src/org/eclipse/emf/cdo/examples/server/DemoServer.java49
-rw-r--r--plugins/org.eclipse.emf.cdo.examples.server/src/org/eclipse/emf/cdo/examples/server/RequestFormServlet.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.examples.server/templates/configOverview.htmljet14
8 files changed, 205 insertions, 28 deletions
diff --git a/plugins/org.eclipse.emf.cdo.examples.server/Demo Server.launch b/plugins/org.eclipse.emf.cdo.examples.server/Demo Server.launch
new file mode 100644
index 0000000000..381960a798
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.examples.server/Demo Server.launch
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.pde.ui.RuntimeWorkbench">
+<booleanAttribute key="append.args" value="true"/>
+<stringAttribute key="application" value="org.eclipse.emf.cdo.examples.server.app"/>
+<booleanAttribute key="askclear" value="true"/>
+<booleanAttribute key="automaticAdd" value="false"/>
+<booleanAttribute key="automaticValidate" value="false"/>
+<stringAttribute key="bootstrap" value=""/>
+<stringAttribute key="checked" value="org.eclipse.emf.cdo.common,org.eclipse.emf.cdo.server,org.eclipse.emf.cdo.server.db,org.eclipse.emf.cdo.server.net4j,org.eclipse.net4j,org.eclipse.net4j.db,org.eclipse.net4j.db.h2,org.eclipse.net4j.jvm,org.eclipse.net4j.tcp,org.eclipse.net4j.util"/>
+<booleanAttribute key="clearConfig" value="false"/>
+<booleanAttribute key="clearws" value="false"/>
+<booleanAttribute key="clearwslog" value="false"/>
+<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/Demo Server"/>
+<booleanAttribute key="default" value="false"/>
+<booleanAttribute key="includeOptional" value="false"/>
+<stringAttribute key="location" value="${workspace_loc}/../runtime-org.eclipse.emf.cdo.examples.server.app"/>
+<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os}&#13;&#10;-ws ${target.ws}&#13;&#10;-arch ${target.arch}&#13;&#10;-nl ${target.nl}&#13;&#10;-consoleLog&#13;&#10;-console"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-server&#13;&#10;-Xms64M&#13;&#10;-Xmx512M&#13;&#10;-Dorg.osgi.service.http.port=3002"/>
+<booleanAttribute key="pde.generated.config" value="false"/>
+<stringAttribute key="pde.version" value="3.3"/>
+<stringAttribute key="product" value="org.eclipse.emf.cdo.examples.server.product"/>
+<stringAttribute key="selectedPlugin" value="org.eclipse.net4j.db.h2"/>
+<stringAttribute key="selected_target_plugins" value="org.eclipse.equinox.common@2:true,org.eclipse.emf.common@default:default,org.eclipse.core.jobs@default:default,org.eclipse.equinox.http.jetty@default:true,org.eclipse.core.variables@default:default,org.eclipse.core.runtime@default:true,org.apache.commons.logging@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.http.registry@default:true,org.apache.jasper@default:default,org.eclipse.equinox.http.servlet@default:default,org.eclipse.ant.core@default:default,org.eclipse.core.resources@default:default,org.eclipse.emf.ecore.xmi@default:default,org.eclipse.osgi.services@default:default,org.apache.commons.el@default:default,org.mortbay.jetty.server@default:default,org.eclipse.osgi@-1:true,org.eclipse.equinox.app@default:default,org.eclipse.team.core@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.core.filesystem@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,javax.servlet@default:default,org.apache.ant@default:default,org.apache.commons.lang@default:default,org.eclipse.emf.ecore.change@default:default,org.eclipse.emf.ecore@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.core.filesystem.win32.x86_64@default:false,org.eclipse.core.contenttype@default:default,org.eclipse.core.expressions@default:default,javax.servlet.jsp@default:default,org.mortbay.jetty.util@default:default,org.h2@default:default"/>
+<stringAttribute key="selected_workspace_plugins" value="org.eclipse.net4j.db.h2@default:default,org.eclipse.net4j.tcp@default:default,org.eclipse.net4j.jvm@default:default,org.eclipse.emf.cdo.server.db@default:default,org.eclipse.emf.cdo.server.net4j@default:default,org.eclipse.emf.cdo@default:default,org.eclipse.net4j.db@default:default,org.eclipse.emf.cdo.examples.server@default:default,org.eclipse.net4j.util@default:default,org.eclipse.emf.cdo.server@default:default,org.eclipse.emf.cdo.common@default:default,org.eclipse.net4j@default:default"/>
+<booleanAttribute key="show_selected_only" value="false"/>
+<booleanAttribute key="tracing" value="true"/>
+<booleanAttribute key="useCustomFeatures" value="false"/>
+<booleanAttribute key="useDefaultConfig" value="true"/>
+<booleanAttribute key="useDefaultConfigArea" value="true"/>
+<booleanAttribute key="useProduct" value="false"/>
+<booleanAttribute key="usefeatures" value="false"/>
+</launchConfiguration>
diff --git a/plugins/org.eclipse.emf.cdo.examples.server/src-gen/templates/ConfigOverview.java b/plugins/org.eclipse.emf.cdo.examples.server/src-gen/templates/ConfigOverview.java
index 73dbfd80c1..1d32933a95 100644
--- a/plugins/org.eclipse.emf.cdo.examples.server/src-gen/templates/ConfigOverview.java
+++ b/plugins/org.eclipse.emf.cdo.examples.server/src-gen/templates/ConfigOverview.java
@@ -1,5 +1,6 @@
package templates;
+import java.util.*;
import org.eclipse.emf.cdo.examples.server.*;
public class ConfigOverview
@@ -17,8 +18,13 @@ public class ConfigOverview
protected final String TEXT_1 = "";
protected final String TEXT_2 = NL + NL + "<html>" + NL + " <header>" + NL + "\t <title>" + NL + "\t\t\t";
protected final String TEXT_3 = NL + "\t </title>" + NL + "\t\t<link media=\"screen\" href=\"gastro.css\" type=\"text/css\" rel=\"stylesheet\">" + NL + "\t<header>" + NL + "<body>" + NL + "" + NL + "<h1>";
- protected final String TEXT_4 = "</h1>" + NL + "<table border=\"0\" width=\"400\">" + NL + "</table>" + NL + "" + NL + "</body>" + NL + "</html>";
- protected final String TEXT_5 = NL;
+ protected final String TEXT_4 = "</h1>" + NL + "" + NL + "<table border=\"0\" width=\"400\">" + NL + "\t<tr><td>Mode:</td><td>";
+ protected final String TEXT_5 = "</td></tr>" + NL + "\t<tr><td>User IDs:</td><td>" + NL + "\t";
+ protected final String TEXT_6 = NL + "\t\t\t";
+ protected final String TEXT_7 = ": ";
+ protected final String TEXT_8 = "<br>";
+ protected final String TEXT_9 = NL + "\t\t</td></tr>" + NL + "</table>" + NL + "" + NL + "</body>" + NL + "</html>";
+ protected final String TEXT_10 = NL;
public String generate(Object argument)
{
@@ -31,7 +37,22 @@ public class ConfigOverview
stringBuffer.append(TEXT_3);
stringBuffer.append(title);
stringBuffer.append(TEXT_4);
+ stringBuffer.append(AbstractTemplateServlet.html(config.getMode().toString()));
stringBuffer.append(TEXT_5);
+
+ Map<String, char[]> users = config.getUsers();
+ List<String> userIDs = new ArrayList<String>(users.keySet());
+ Collections.sort(userIDs);
+ for (String userID : userIDs)
+ {
+ stringBuffer.append(TEXT_6);
+ stringBuffer.append(userID);
+ stringBuffer.append(TEXT_7);
+ stringBuffer.append(users.get(userID));
+ stringBuffer.append(TEXT_8);
+ }
+ stringBuffer.append(TEXT_9);
+ stringBuffer.append(TEXT_10);
return stringBuffer.toString();
}
}
diff --git a/plugins/org.eclipse.emf.cdo.examples.server/src/org/eclipse/emf/cdo/examples/server/AbstractTemplateServlet.java b/plugins/org.eclipse.emf.cdo.examples.server/src/org/eclipse/emf/cdo/examples/server/AbstractTemplateServlet.java
index b55a5141f2..910ca40f43 100644
--- a/plugins/org.eclipse.emf.cdo.examples.server/src/org/eclipse/emf/cdo/examples/server/AbstractTemplateServlet.java
+++ b/plugins/org.eclipse.emf.cdo.examples.server/src/org/eclipse/emf/cdo/examples/server/AbstractTemplateServlet.java
@@ -31,7 +31,7 @@ import java.text.NumberFormat;
/**
* @author Eike Stepper
*/
-public abstract class AbstractTemplateServlet extends HttpServlet
+public abstract class AbstractTemplateServlet<ARGUMENT> extends HttpServlet
{
private static final long serialVersionUID = 1L;
@@ -75,7 +75,7 @@ public abstract class AbstractTemplateServlet extends HttpServlet
try
{
- Object argument = createTemplateArgument(req);
+ ARGUMENT argument = createTemplateArgument(req);
String html = (String)method.invoke(template, argument);
writer.print(html);
}
@@ -105,7 +105,7 @@ public abstract class AbstractTemplateServlet extends HttpServlet
{
}
- protected abstract Object createTemplateArgument(HttpServletRequest req);
+ protected abstract ARGUMENT createTemplateArgument(HttpServletRequest req);
public static String html(String value)
{
diff --git a/plugins/org.eclipse.emf.cdo.examples.server/src/org/eclipse/emf/cdo/examples/server/ConfigOverviewServlet.java b/plugins/org.eclipse.emf.cdo.examples.server/src/org/eclipse/emf/cdo/examples/server/ConfigOverviewServlet.java
index 80207eeb56..3e0de625c5 100644
--- a/plugins/org.eclipse.emf.cdo.examples.server/src/org/eclipse/emf/cdo/examples/server/ConfigOverviewServlet.java
+++ b/plugins/org.eclipse.emf.cdo.examples.server/src/org/eclipse/emf/cdo/examples/server/ConfigOverviewServlet.java
@@ -13,6 +13,8 @@
*/
package org.eclipse.emf.cdo.examples.server;
+import org.eclipse.emf.cdo.examples.server.DemoConfiguration.Mode;
+
import templates.ConfigOverview;
import javax.servlet.http.HttpServletRequest;
@@ -20,7 +22,7 @@ import javax.servlet.http.HttpServletRequest;
/**
* @author Eike Stepper
*/
-public class ConfigOverviewServlet extends AbstractTemplateServlet
+public class ConfigOverviewServlet extends AbstractTemplateServlet<DemoConfiguration>
{
private static final long serialVersionUID = 1L;
@@ -31,8 +33,41 @@ public class ConfigOverviewServlet extends AbstractTemplateServlet
}
@Override
- protected Object createTemplateArgument(HttpServletRequest req)
+ protected DemoConfiguration createTemplateArgument(HttpServletRequest req)
+ {
+ String name = req.getParameter("name");
+ if (name != null)
+ {
+ return getDemoConfiguration(name);
+ }
+
+ String mode = req.getParameter("mode");
+ String userIDs = req.getParameter("userIDs");
+ return createDemoConfiguration(mode, userIDs);
+ }
+
+ protected DemoConfiguration createDemoConfiguration(String mode, String userIDs)
{
- return null;
+ DemoConfiguration config = new DemoConfiguration();
+ config.setMode(Mode.valueOf(mode));
+ if (userIDs != null)
+ {
+ config.setUserIDs(userIDs.split(","));
+ }
+
+ config.activate();
+ DemoServer.INSTANCE.getConfigs().put(config.getName(), config);
+ return config;
+ }
+
+ protected DemoConfiguration getDemoConfiguration(String name)
+ {
+ DemoConfiguration config = DemoServer.INSTANCE.getConfigs().get(name);
+ if (config == null)
+ {
+ throw new IllegalStateException("No demo configuration available for " + name);
+ }
+
+ return config;
}
}
diff --git a/plugins/org.eclipse.emf.cdo.examples.server/src/org/eclipse/emf/cdo/examples/server/DemoConfiguration.java b/plugins/org.eclipse.emf.cdo.examples.server/src/org/eclipse/emf/cdo/examples/server/DemoConfiguration.java
index deb78a26c3..f2deccd1c3 100644
--- a/plugins/org.eclipse.emf.cdo.examples.server/src/org/eclipse/emf/cdo/examples/server/DemoConfiguration.java
+++ b/plugins/org.eclipse.emf.cdo.examples.server/src/org/eclipse/emf/cdo/examples/server/DemoConfiguration.java
@@ -23,8 +23,10 @@ import org.eclipse.net4j.db.DBUtil;
import org.eclipse.net4j.db.IDBAdapter;
import org.eclipse.net4j.db.IDBConnectionProvider;
import org.eclipse.net4j.signal.ISignalProtocol;
+import org.eclipse.net4j.util.StringUtil;
import org.eclipse.net4j.util.container.ContainerEventAdapter;
import org.eclipse.net4j.util.container.IContainer;
+import org.eclipse.net4j.util.container.IPluginContainer;
import org.eclipse.net4j.util.event.IEvent;
import org.eclipse.net4j.util.event.IListener;
import org.eclipse.net4j.util.lifecycle.Lifecycle;
@@ -36,6 +38,7 @@ import org.h2.jdbcx.JdbcDataSource;
import javax.sql.DataSource;
+import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.Random;
@@ -45,7 +48,7 @@ import java.util.Random;
*/
public class DemoConfiguration extends Lifecycle
{
- private static final int NAME_LENGTH = 64;
+ private static final int NAME_LENGTH = 16;
private static final String NAME_ALPHABET = "abcdefghijklmnopqrstuvwxyz";
@@ -57,6 +60,8 @@ public class DemoConfiguration extends Lifecycle
private transient InternalRepository repository;
+ private DemoUserManager userManager;
+
private transient long lastAccess;
public DemoConfiguration()
@@ -82,6 +87,17 @@ public class DemoConfiguration extends Lifecycle
public void setUserIDs(String[] userIDs)
{
checkInactive();
+ if (userIDs != null)
+ {
+ if (userIDs.length != 0)
+ {
+ if (StringUtil.isEmpty(userIDs[0]))
+ {
+ userIDs = null;
+ }
+ }
+ }
+
this.userIDs = userIDs;
}
@@ -95,6 +111,16 @@ public class DemoConfiguration extends Lifecycle
return repository;
}
+ public Map<String, char[]> getUsers()
+ {
+ if (userManager == null)
+ {
+ return Collections.emptyMap();
+ }
+
+ return userManager.getUsers();
+ }
+
public long getLastAccess()
{
return lastAccess;
@@ -122,7 +148,7 @@ public class DemoConfiguration extends Lifecycle
sessionManager.setUserManager(userManager);
}
- LifecycleUtil.activate(repository);
+ CDOServerUtil.addRepository(IPluginContainer.INSTANCE, repository);
}
@Override
@@ -175,7 +201,7 @@ public class DemoConfiguration extends Lifecycle
protected DataSource createDataSource()
{
JdbcDataSource dataSource = new JdbcDataSource();
- dataSource.setURL("jdbc:h2:databases/" + name + "/h2test;SCHEMA=" + name);
+ dataSource.setURL("jdbc:h2:databases/" + name + "/h2test");
return dataSource;
}
@@ -189,13 +215,16 @@ public class DemoConfiguration extends Lifecycle
protected void onAdded(IContainer<ISession> container, ISession session)
{
ISignalProtocol<?> protocol = (ISignalProtocol<?>)session.getProtocol();
- protocol.addListener(new IListener()
+ if (protocol != null)
{
- public void notifyEvent(IEvent event)
+ protocol.addListener(new IListener()
{
- lastAccess = System.currentTimeMillis();
- }
- });
+ public void notifyEvent(IEvent event)
+ {
+ lastAccess = System.currentTimeMillis();
+ }
+ });
+ }
}
});
@@ -204,7 +233,7 @@ public class DemoConfiguration extends Lifecycle
protected IUserManager createUserManager()
{
- UserManager userManager = new UserManager();
+ userManager = new DemoUserManager();
for (int i = 0; i < userIDs.length; i++)
{
String userID = userIDs[i];
@@ -218,6 +247,21 @@ public class DemoConfiguration extends Lifecycle
/**
* @author Eike Stepper
*/
+ private static final class DemoUserManager extends UserManager
+ {
+ public DemoUserManager()
+ {
+ }
+
+ public Map<String, char[]> getUsers()
+ {
+ return users;
+ }
+ }
+
+ /**
+ * @author Eike Stepper
+ */
public enum Mode
{
NORMAL, AUDITING, BRANCHING
diff --git a/plugins/org.eclipse.emf.cdo.examples.server/src/org/eclipse/emf/cdo/examples/server/DemoServer.java b/plugins/org.eclipse.emf.cdo.examples.server/src/org/eclipse/emf/cdo/examples/server/DemoServer.java
index 1be0535683..404dfcdf94 100644
--- a/plugins/org.eclipse.emf.cdo.examples.server/src/org/eclipse/emf/cdo/examples/server/DemoServer.java
+++ b/plugins/org.eclipse.emf.cdo.examples.server/src/org/eclipse/emf/cdo/examples/server/DemoServer.java
@@ -10,11 +10,16 @@
*/
package org.eclipse.emf.cdo.examples.server;
-import org.eclipse.emf.cdo.server.IRepository;
-
+import org.eclipse.net4j.acceptor.IAcceptor;
+import org.eclipse.net4j.tcp.TCPUtil;
import org.eclipse.net4j.util.container.IPluginContainer;
import org.eclipse.net4j.util.lifecycle.LifecycleUtil;
+import org.eclipse.net4j.util.om.OMPlatform;
import org.eclipse.net4j.util.om.OSGiApplication;
+import org.eclipse.net4j.util.om.log.EclipseLoggingBridge;
+
+import java.util.HashMap;
+import java.util.Map;
/**
* @author Eike Stepper
@@ -25,23 +30,44 @@ public class DemoServer extends OSGiApplication
public static final String PROP_BROWSER_PORT = OM.BUNDLE_ID + ".browser.port"; //$NON-NLS-1$
- private IRepository[] repositories;
+ public static final int PORT = 3003;
+
+ public static DemoServer INSTANCE;
+
+ private IAcceptor acceptor;
+
+ private Map<String, DemoConfiguration> configs = new HashMap<String, DemoConfiguration>();
public DemoServer()
{
super(ID);
+ INSTANCE = this;
+ }
+
+ public IAcceptor getAcceptor()
+ {
+ return acceptor;
+ }
+
+ public Map<String, DemoConfiguration> getConfigs()
+ {
+ return configs;
}
@Override
protected void doStart() throws Exception
{
super.doStart();
+ OMPlatform.INSTANCE.removeLogHandler(EclipseLoggingBridge.INSTANCE);
OM.LOG.info("Demo server starting");
+ IPluginContainer container = IPluginContainer.INSTANCE;
+ acceptor = TCPUtil.getAcceptor(container, "0.0.0.0:" + PORT);
+
String port = System.getProperty(PROP_BROWSER_PORT);
if (port != null)
{
- IPluginContainer.INSTANCE.getElement("org.eclipse.emf.cdo.server.db.browsers", "default", port); //$NON-NLS-1$ //$NON-NLS-2$
+ container.getElement("org.eclipse.emf.cdo.server.db.browsers", "default", port); //$NON-NLS-1$ //$NON-NLS-2$
}
OM.LOG.info("Demo server started");
@@ -51,12 +77,17 @@ public class DemoServer extends OSGiApplication
protected void doStop() throws Exception
{
OM.LOG.info("Demo server stopping");
- if (repositories != null)
+ for (DemoConfiguration config : configs.values().toArray(new DemoConfiguration[configs.size()]))
+ {
+ config.deactivate();
+ }
+
+ configs.clear();
+
+ if (acceptor != null)
{
- for (IRepository repository : repositories)
- {
- LifecycleUtil.deactivate(repository);
- }
+ LifecycleUtil.deactivate(acceptor);
+ acceptor = null;
}
OM.LOG.info("Demo server stopped");
diff --git a/plugins/org.eclipse.emf.cdo.examples.server/src/org/eclipse/emf/cdo/examples/server/RequestFormServlet.java b/plugins/org.eclipse.emf.cdo.examples.server/src/org/eclipse/emf/cdo/examples/server/RequestFormServlet.java
index 1f4802bae4..ba8eed811c 100644
--- a/plugins/org.eclipse.emf.cdo.examples.server/src/org/eclipse/emf/cdo/examples/server/RequestFormServlet.java
+++ b/plugins/org.eclipse.emf.cdo.examples.server/src/org/eclipse/emf/cdo/examples/server/RequestFormServlet.java
@@ -20,7 +20,7 @@ import javax.servlet.http.HttpServletRequest;
/**
* @author Eike Stepper
*/
-public class RequestFormServlet extends AbstractTemplateServlet
+public class RequestFormServlet extends AbstractTemplateServlet<Object>
{
private static final long serialVersionUID = 1L;
diff --git a/plugins/org.eclipse.emf.cdo.examples.server/templates/configOverview.htmljet b/plugins/org.eclipse.emf.cdo.examples.server/templates/configOverview.htmljet
index 83f8c1cefe..e14b9639bc 100644
--- a/plugins/org.eclipse.emf.cdo.examples.server/templates/configOverview.htmljet
+++ b/plugins/org.eclipse.emf.cdo.examples.server/templates/configOverview.htmljet
@@ -1,7 +1,7 @@
<%@ jet
class="ConfigOverview"
package="templates"
- imports="org.eclipse.emf.cdo.examples.server.*" %>
+ imports="java.util.* org.eclipse.emf.cdo.examples.server.*" %>
<% DemoConfiguration config = (DemoConfiguration)argument; %>
<% String title = "Demo Configuration " + AbstractTemplateServlet.html(config.getName()); %>
@@ -16,7 +16,19 @@
<body>
<h1><%=title%></h1>
+
<table border="0" width="400">
+ <tr><td>Mode:</td><td><%=AbstractTemplateServlet.html(config.getMode().toString())%></td></tr>
+ <tr><td>User IDs:</td><td>
+ <%
+ Map<String, char[]> users = config.getUsers();
+ List<String> userIDs = new ArrayList<String>(users.keySet());
+ Collections.sort(userIDs);
+ for (String userID : userIDs)
+ { %>
+ <%=userID%>: <%=users.get(userID)%><br>
+ <% } %>
+ </td></tr>
</table>
</body>

Back to the top