Skip to content

Commit 3be1c1a

Browse files
committed
Works on Tomcat
1 parent f313af1 commit 3be1c1a

2 files changed

Lines changed: 23 additions & 1 deletion

File tree

web/src/main/java/com/github/oeuvres/alix/web/AlixServlet.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ public class AlixServlet extends HttpServlet
6262
private static final String CONTENT_CSV = "text/csv";
6363
private static final String CONTENT_HTML = "text/html";
6464
private static final String CONTENT_JSON = "application/json";
65+
private static final String CONTENT_JSONL = "application/x-ndjson";
6566
private static final String CONF_DIR_PARAM = "alix.conf.dir";
6667
private static final Gson GSON = new Gson();
6768
private static final Logger LOG = Logger.getLogger(AlixServlet.class.getName());
@@ -556,7 +557,7 @@ protected static void prepareJson(final HttpServletResponse response)
556557
*/
557558
protected static void prepareJsonl(final HttpServletResponse response)
558559
{
559-
response.setContentType(CONTENT_JSON);
560+
response.setContentType(CONTENT_JSONL);
560561
}
561562

562563

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<web-app xmlns="https://jakarta.ee/xml/ns/jakartaee"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee
5+
https://jakarta.ee/xml/ns/jakartaee/web-app_6_0.xsd"
6+
version="6.0">
7+
8+
<display-name>Alix</display-name>
9+
10+
<servlet>
11+
<servlet-name>AlixServlet</servlet-name>
12+
<servlet-class>com.github.oeuvres.alix.web.AlixServlet</servlet-class>
13+
<load-on-startup>1</load-on-startup>
14+
</servlet>
15+
16+
<servlet-mapping>
17+
<servlet-name>AlixServlet</servlet-name>
18+
<url-pattern>/*</url-pattern>
19+
</servlet-mapping>
20+
21+
</web-app>

0 commit comments

Comments
 (0)