> > I want to clarify the following scenario: > > I have two jsp's defined as follows > > includejsp.jsp: > > <%@ page contentType="text/html; charset=euc-kr" %> > > <br> > > Result of includejsp.jsp > > <br> > > <!-- Korean (1)*********/--> > > ÇÑ±Û Å×½ºÆ® > > <br> > > <%= "Test Include"%> > > <br> > > <br> > > ------------------- > > and test.jsp defined as follows: > > <%@ include file="./includejsp.jsp" %> > > <br> > > <BR> > > Result of test.jsp > > <BR> > > <!-- Korean (2)*********/--> > > ÇÑ±Û Å×½ºÆ® > > <BR> > > Test Test!!! > > ---------------- > > Should the <%@ page contentType="text/html; charset=euc-kr" %> in > includejsp.jsp affect how the characters are translated during the gernation > process in test.jsp? In Tomcat 4.03, the korean string in test.jsp is > translated in unicode and the one in includejsp.jsp is translated properly. > > Thanks for any comments, Jeff. As the charset of the contentType or pageEncoding charset should affect the translation of the whole translation unit, both including page and included page (in the sense of include directive).
Section 8.3 of the servlet spec forbids an included page from changing any headers. In particular, it can't change content-type
Maybe my original description was misleading. What I mean is for pages doing includes via the include directive, if the page being included specifies an encoding in the contentType attribute, should the parent not honour this encoding? What I am seeing in 4.03 is only the included page is generated with the proper encoding.
Looks like a dupicate bug 11656.
*** This bug has been marked as a duplicate of 11656 ***