When <jsp:include>
is used for including HTML file DispatcherServlet
is throwing
java.lang.IllegalStateException: Cannot forward after response has been committed
I have one servlet:
<servlet-mapping>
<servlet-name>web</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
In it, I have enabled Spring MVC annotations and have handler mapping and adapter for JSP files without controllers (converting old webapp to Spring). And I have enabled DefaultServletHttpRequestHandler
in this Servlet.
Any idea how to avoid that IllegalStateException
when including html files?