diff options
Diffstat (limited to 'language-web')
-rw-r--r-- | language-web/src/main/java/org/eclipse/viatra/solver/language/web/ProblemServlet.java | 2 | ||||
-rw-r--r-- | language-web/src/main/java/org/eclipse/viatra/solver/language/web/ServerLauncher.java | 9 |
2 files changed, 1 insertions, 10 deletions
diff --git a/language-web/src/main/java/org/eclipse/viatra/solver/language/web/ProblemServlet.java b/language-web/src/main/java/org/eclipse/viatra/solver/language/web/ProblemServlet.java index 337df54b..18b86ade 100644 --- a/language-web/src/main/java/org/eclipse/viatra/solver/language/web/ProblemServlet.java +++ b/language-web/src/main/java/org/eclipse/viatra/solver/language/web/ProblemServlet.java | |||
@@ -4,7 +4,6 @@ | |||
4 | package org.eclipse.viatra.solver.language.web; | 4 | package org.eclipse.viatra.solver.language.web; |
5 | 5 | ||
6 | import javax.servlet.ServletException; | 6 | import javax.servlet.ServletException; |
7 | import javax.servlet.annotation.WebServlet; | ||
8 | 7 | ||
9 | import org.eclipse.xtext.util.DisposableRegistry; | 8 | import org.eclipse.xtext.util.DisposableRegistry; |
10 | import org.eclipse.xtext.web.servlet.XtextServlet; | 9 | import org.eclipse.xtext.web.servlet.XtextServlet; |
@@ -12,7 +11,6 @@ import org.eclipse.xtext.web.servlet.XtextServlet; | |||
12 | /** | 11 | /** |
13 | * Deploy this class into a servlet container to enable DSL-specific services. | 12 | * Deploy this class into a servlet container to enable DSL-specific services. |
14 | */ | 13 | */ |
15 | @WebServlet(name = "XtextServices", urlPatterns = "/xtext-service/*") | ||
16 | public class ProblemServlet extends XtextServlet { | 14 | public class ProblemServlet extends XtextServlet { |
17 | 15 | ||
18 | private static final long serialVersionUID = 1L; | 16 | private static final long serialVersionUID = 1L; |
diff --git a/language-web/src/main/java/org/eclipse/viatra/solver/language/web/ServerLauncher.java b/language-web/src/main/java/org/eclipse/viatra/solver/language/web/ServerLauncher.java index a9017264..63088511 100644 --- a/language-web/src/main/java/org/eclipse/viatra/solver/language/web/ServerLauncher.java +++ b/language-web/src/main/java/org/eclipse/viatra/solver/language/web/ServerLauncher.java | |||
@@ -9,15 +9,10 @@ import java.net.InetSocketAddress; | |||
9 | import java.net.URI; | 9 | import java.net.URI; |
10 | import java.net.URISyntaxException; | 10 | import java.net.URISyntaxException; |
11 | 11 | ||
12 | import org.eclipse.jetty.annotations.AnnotationConfiguration; | ||
13 | import org.eclipse.jetty.server.Server; | 12 | import org.eclipse.jetty.server.Server; |
14 | import org.eclipse.jetty.util.log.Slf4jLog; | 13 | import org.eclipse.jetty.util.log.Slf4jLog; |
15 | import org.eclipse.jetty.util.resource.Resource; | 14 | import org.eclipse.jetty.util.resource.Resource; |
16 | import org.eclipse.jetty.webapp.Configuration; | ||
17 | import org.eclipse.jetty.webapp.MetaInfConfiguration; | ||
18 | import org.eclipse.jetty.webapp.WebAppContext; | 15 | import org.eclipse.jetty.webapp.WebAppContext; |
19 | import org.eclipse.jetty.webapp.WebInfConfiguration; | ||
20 | import org.eclipse.jetty.webapp.WebXmlConfiguration; | ||
21 | 16 | ||
22 | public class ServerLauncher { | 17 | public class ServerLauncher { |
23 | private static final Slf4jLog LOG = new Slf4jLog(ServerLauncher.class.getName()); | 18 | private static final Slf4jLog LOG = new Slf4jLog(ServerLauncher.class.getName()); |
@@ -30,9 +25,7 @@ public class ServerLauncher { | |||
30 | ctx.setBaseResource(baseResource); | 25 | ctx.setBaseResource(baseResource); |
31 | ctx.setWelcomeFiles(new String[] { "index.html" }); | 26 | ctx.setWelcomeFiles(new String[] { "index.html" }); |
32 | ctx.setContextPath("/"); | 27 | ctx.setContextPath("/"); |
33 | ctx.setConfigurations(new Configuration[] { new AnnotationConfiguration(), new WebXmlConfiguration(), | 28 | ctx.addServlet(ProblemServlet.class, "/xtext-service/*"); |
34 | new WebInfConfiguration(), new MetaInfConfiguration() }); | ||
35 | ctx.setAttribute(WebInfConfiguration.CONTAINER_JAR_PATTERN, ".*/build/classes/.*,.*\\.jar"); | ||
36 | ctx.setInitParameter("org.eclipse.jetty.servlet.Default.useFileMappedBuffer", "false"); | 29 | ctx.setInitParameter("org.eclipse.jetty.servlet.Default.useFileMappedBuffer", "false"); |
37 | server.setHandler(ctx); | 30 | server.setHandler(ctx); |
38 | } | 31 | } |