Skip to content

Commit e77f848

Browse files
committed
Replaced restx-server-simple by restx-server-jetty in samplest since restx-server-simple doesn't propagate exceptions occuring during route processing,
which makes debugging very hard (and seems things are not working at all). With restx-server-jetty, when an exception is raised, it is displayed into the HTTP response body
1 parent 85c11f2 commit e77f848

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

restx-samplest/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
</dependency>
5050
<dependency>
5151
<groupId>io.restx</groupId>
52-
<artifactId>restx-server-simple</artifactId>
52+
<artifactId>restx-server-jetty</artifactId>
5353
</dependency>
5454
<dependency>
5555
<groupId>io.restx</groupId>

restx-samplest/src/main/java/samplest/AppServer.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
11
package samplest;
22

33
import com.google.common.base.Optional;
4+
import restx.server.JettyWebServer;
45
import restx.server.WebServer;
5-
import restx.server.simple.simple.SimpleWebServer;
6+
//import restx.server.simple.simple.SimpleWebServer;
67

78
/**
89
* Date: 1/12/13
910
* Time: 14:18
1011
*/
1112
public class AppServer {
13+
public static final String WEB_INF_LOCATION = "src/main/webapp/WEB-INF/web.xml";
14+
public static final String WEB_APP_LOCATION = "src/main/webapp";
15+
1216
public static void main(String[] args) throws Exception {
1317
int port = Integer.valueOf(Optional.fromNullable(System.getenv("PORT")).or("8080"));
14-
WebServer server = SimpleWebServer.builder().setRouterPath("/api").setPort(port).build();
18+
WebServer server = new JettyWebServer(WEB_INF_LOCATION, WEB_APP_LOCATION, port, "0.0.0.0");
1519

1620
/*
1721
* load mode from system property if defined, or default to dev

0 commit comments

Comments
 (0)