today, in the code development, there is a Java.lang.IllegalStateException exception, response.sendredirect ("./default.html"); This statement has an error.
After the online search, found that the problem is likely to be because the Response.sendredirect method executed two times, one of which is certainly the project framework within the jump, and I want to jump, it seems extremely inconvenient, finally I put my eyes on the front page, the front page to jump.
At first, my front-end statement was: window.location.href= "./default.html";
But this method has a not obvious bug, my business logic is from the start page to the a page, and then on a page to determine whether to jump to the default page, if it is the default, there is a problem, When I click on the page to return (JS code can be: Window.history.go (-1);), the first return is a page, not the start page, to two times a quick click to return to the start page.
The Final Solution: Window.location.replace ("./default.html");
The effect of this writing is consistent with the method above, but when I return to the point, I return directly to the start page without first returning to the a page.
The solution of java.lang.IllegalStateException anomaly of Response.sendredirect newspaper