aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/web
diff options
context:
space:
mode:
authorRafael Guterres <guterresrafael@gmail.com>2015-11-27 03:46:47 -0200
committerRafael Guterres <guterresrafael@gmail.com>2015-11-27 03:46:47 -0200
commit1a25796d62bdf88f2cba0387a09e2eb71599e588 (patch)
tree532c32341faa343eb03fc45eced9b0a6cd0df4dd /src/org/traccar/web
parentca06e8d38c0bbd5a68e63ebada8e115da252b055 (diff)
downloadtrackermap-server-1a25796d62bdf88f2cba0387a09e2eb71599e588.tar.gz
trackermap-server-1a25796d62bdf88f2cba0387a09e2eb71599e588.tar.bz2
trackermap-server-1a25796d62bdf88f2cba0387a09e2eb71599e588.zip
Merge tananaev/master
Conflicts: src/org/traccar/web/WebServer.java
Diffstat (limited to 'src/org/traccar/web')
-rw-r--r--src/org/traccar/web/WebServer.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/org/traccar/web/WebServer.java b/src/org/traccar/web/WebServer.java
index 0f9bf8181..2318c4151 100644
--- a/src/org/traccar/web/WebServer.java
+++ b/src/org/traccar/web/WebServer.java
@@ -128,6 +128,15 @@ public class WebServer {
handlers.addHandler(servletHandler);
}
+ private void initRestApi() {
+ ResourceConfig resourceConfig = new ResourceConfig();
+ resourceConfig.packages("org.traccar.api");
+ ServletContextHandler servletHandler = new ServletContextHandler(ServletContextHandler.NO_SESSIONS);
+ ServletHolder servletHolder = new ServletHolder(new ServletContainer(resourceConfig));
+ servletHandler.addServlet(servletHolder, "/rest/*");
+ handlers.addHandler(servletHandler);
+ }
+
public void start() {
try {
server.start();