I am new in reactjs
and I have a little project in reactjs
to play with and learn it. I need to have to type of headers which will be shown based o
In my case I wanted a simple solution as with creating a customer error page. However that solution still sets a status code 404
which is not desired.
So I use a small jsp file which will set status code to 200
before outputting the SPA's index.html
.
I hope this helps someone else looking for a simple solution without returning status 404
.
web.xml
404
/spa.jsp
spa.jsp
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%><%
response.setStatus(200);
%><%@include file="./dashboard/index.html"%>