https://bz.apache.org/bugzilla/show_bug.cgi?id=57659
Bug ID: 57659 Summary: Change to mime mapping breaks the ability to include javascript files Product: Tomcat 6 Version: 6.0.43 Hardware: PC Status: NEW Severity: regression Priority: P2 Component: Servlet & JSP API Assignee: dev@tomcat.apache.org Reporter: d.avan...@gmail.com This issue is related to bug ID 54527. In this earlier defect, the mime mappings in Tomcat 6.0.37 "web.xml" were "synchronized" with the Tomcat 7 mapping. One such mapping that was synchronized was the "js" mapping. It was changed from "text/javascript" to "application/javascript". However, there is another aspect of the synchronization that was omitted. In Tomcat 7, the "serveResource" method of "DefaultServlet.java" contains NEW logic that allows 'contentType.contains("/javascript")' to be included. This logic is not present in Tomcat 6.0.37. Because it is not present, the new mime-mapping for js files will cause an "IllegalStateException" when trying to "include" JS files from JSP pages: SEVERE: Servlet.service() for servlet default threw exception java.lang.IllegalStateException at org.apache.jasper.runtime.ServletResponseWrapperInclude.getOutputStream(ServletResponseWrapperInclude.java:63) at org.apache.catalina.servlets.DefaultServlet.serveResource(DefaultServlet.java:884) at org.apache.catalina.servlets.DefaultServlet.doGet(DefaultServlet.java:422) at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) at javax.servlet.http.HttpServlet.service(HttpServlet.java:723) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) : at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:968) -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org