i have the following...
// HTML page
<html>
<head>
<script type="text/javascript" src="scripts.jsp"></script>
...
// scripts.jsp
<%@page contentType="text/javascript" %>
<
jsp:include page="page1.js" />
...
// page1.js
var obj = new Array();
obj[obj.length] = "str1";
obj[obj.length] = "str2";
obj[obj.length] = "str &PlusMinus ing";
we noticed a problem when the HTML displayed the "±" value found in obj[] - it was some weird funky character, obviously corrupt. if I inspect page1.js, the "&PlusMinus" is the correct character. if I inspect scripts.jsp after the jsp:include and before it is sent to the browser, the "±" is corrupted. therefore, i can only come to the conclusion that the jsp:include is corrupting the character.
a) this is a problem for more than just ±
b) jsp:include doesn't seem to have a parameter or attribute that can be set re: charset
c) JSP documentation states that adding "charset:UTF-8" to the @page declaration has no affect on jsp:include
d) I cannot use the other "include" because our content is dynamic, not static
e) I cannot reference page1.js from the HTML directly because some of our pages are not actually in web-accessible locations
help! how does one get jsp:include to use the correct charset so not to corrupt the characters of the content being included?
thanks!
kelly