out.write("<script type=\"text/javascript\">\n");
pageContext.include("/static/esf/esf.js",true);
out.write("</script>\n");
But the exception IllegalStateException is thrown on the include of
the esf.js file. The reason is null, so there's no more details. I
find it odd in that the two prior includes works okay, but that third
one fails. The file is definitely there (and has been working under
TC 6.0 before).
When I change the code to use /static/esf/esf.javascript and rename
the file to have the same suffix, the exception is not thrown.
Is there anything special about the .js suffix on a file for
pageContext.include()?
Okay, I learned that this is because web.xml for TC 6 uses:
<mime-mapping>
<extension>js</extension>
<mime-type>text/javascript</mime-type>
</mime-mapping>
But TC 7 uses:
<mime-mapping>
<extension>js</extension>
<mime-type>application/javascript</mime-type>
</mime-mapping>
If I put the old TC 6 version in my app's web.xml, then it works again.
Question: Is this to be expected? Is TC 7 doing the "right thing"
here? Am I breaking something when I update my app's web.xml to say
it's 'text' again?
Seems like javascript is really text, and so treating as something else
is not correct, even if the mime type is correctly supposed to be
application/javascript. Maybe TC needs to "know" this particular mime
type is text and not binary data?
David
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org