package com.transparent.politics.servlet;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class EmberServlet extends HttpServlet {

	private static final long serialVersionUID = -4869033449765247770L;

    @Override
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    	String requestURI = request.getRequestURI();
    	if (requestURI.startsWith("/index.html") ||requestURI.startsWith("/assets") || requestURI.startsWith("/fonts")) {
    		// Serve static content of the original request
			getServletContext().getNamedDispatcher("default").forward(request, response);
    	} else {
    		// Forward request to the ember html file
    		request.getRequestDispatcher("/index.html").forward(request, response);
    	}
    }
	
}
@@ -575,16 +575,21 @@
 sWith(%22/
+dist/
 index.ht
@@ -619,16 +619,21 @@
 sWith(%22/
+dist/
 assets%22)
@@ -660,16 +660,21 @@
 sWith(%22/
+dist/
 fonts%22))
@@ -910,16 +910,21 @@
 tcher(%22/
+dist/
 index.ht

fix /dist servlet mapping