Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenrik Lindberg2009-04-30 18:27:25 -0400
committerHenrik Lindberg2009-04-30 18:27:25 -0400
commit8de8bfa6631f61fbf48c39e3ed8c0983b55fccd1 (patch)
tree8503aa9f83cefcc41c6aacba18a4e6cc9e6d6e7f /bundles/org.eclipse.equinox.p2.testserver
parent5998150db6f0ad7a5b387d05c24dc95f53d3d231 (diff)
downloadrt.equinox.p2-8de8bfa6631f61fbf48c39e3ed8c0983b55fccd1.tar.gz
rt.equinox.p2-8de8bfa6631f61fbf48c39e3ed8c0983b55fccd1.tar.xz
rt.equinox.p2-8de8bfa6631f61fbf48c39e3ed8c0983b55fccd1.zip
When starting testserver "automatically", servlets registered as extensions does not start. Changed the setup of the two servlets timeout and status - they are now started in the Activator.
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.testserver')
-rw-r--r--bundles/org.eclipse.equinox.p2.testserver/plugin.xml14
-rw-r--r--bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/Activator.java6
2 files changed, 6 insertions, 14 deletions
diff --git a/bundles/org.eclipse.equinox.p2.testserver/plugin.xml b/bundles/org.eclipse.equinox.p2.testserver/plugin.xml
index bb4ece093..2b35d936a 100644
--- a/bundles/org.eclipse.equinox.p2.testserver/plugin.xml
+++ b/bundles/org.eclipse.equinox.p2.testserver/plugin.xml
@@ -8,19 +8,5 @@
class="org.eclipse.equinox.p2.testserver.servlets.HelloWorld">
</servlet>
</extension>
- <extension
- point="org.eclipse.equinox.http.registry.servlets">
- <servlet
- alias="/status"
- class="org.eclipse.equinox.p2.testserver.servlets.StatusCodeResponse">
- </servlet>
- </extension>
- <extension
- point="org.eclipse.equinox.http.registry.servlets">
- <servlet
- alias="/timeout"
- class="org.eclipse.equinox.p2.testserver.servlets.TimeOut">
- </servlet>
- </extension>
</plugin>
diff --git a/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/Activator.java b/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/Activator.java
index 03e935b69..81da587ba 100644
--- a/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/Activator.java
+++ b/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/Activator.java
@@ -16,6 +16,8 @@ import javax.servlet.ServletException;
import org.eclipse.equinox.p2.testserver.servlets.BasicResourceDelivery;
import org.eclipse.equinox.p2.testserver.servlets.ChopAndDelay;
import org.eclipse.equinox.p2.testserver.servlets.FileMolester;
+import org.eclipse.equinox.p2.testserver.servlets.StatusCodeResponse;
+import org.eclipse.equinox.p2.testserver.servlets.TimeOut;
import org.eclipse.equinox.p2.testserver.servlets.Truncator;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
@@ -60,6 +62,10 @@ public class Activator implements BundleActivator, ServiceTrackerCustomizer {
httpService.registerResources("/private", "/webfiles", secureHttpContext); //$NON-NLS-1$ //$NON-NLS-2$
httpService.registerResources("/never", "/webfiles", alwaysFail); //$NON-NLS-1$ //$NON-NLS-2$
httpService.registerResources("/flipflop", "/webfiles", flipFlop); //$NON-NLS-1$ //$NON-NLS-2$
+
+ httpService.registerServlet("/status", new StatusCodeResponse(), null, null); //$NON-NLS-1$
+ httpService.registerServlet("/timeout", new TimeOut(), null, null); //$NON-NLS-1$
+
httpService.registerServlet("/truncated", new Truncator("/truncated", URI.create("/webfiles"), 50), null, null); //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
httpService.registerServlet("/molested", new FileMolester("/molested", URI.create("/webfiles"), 40), null, null); //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
// 8 bytes at a time, delay from 0 to 100 ms, in steps of 5

Back to the top