You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Arik Kfir <ar...@mail.com> on 2001/04/12 04:33:15 UTC
Encoding problem with <%@ include %> directive
Hi all..
This is the first time I'm using a mailing list...
Excuse me if I violate any rules here ;-)
My problem/bug is this: I have a JSP page,
call it MyPage.jsp. The page has the
following @page directive:
<%@ page
language="Java"
session="false"
buffer="none"
errorPage="error.jsp"
contentType="text/html;charset=WINDOWS-1255"
%>
Note the encoding in the *contentType* attribute -
its a Hebrew encoding. In the middle of the page
I have put the following statement:
<%@ include file="MyIncludePage.jsp" %>
The MyIncludePage.jsp page has the same @page
statement (with the same encoding) and includes
some Hebrew characters in its body. Now here comes the
interesting part: when I run MyIncludePage.jsp
on its own in the browser, my Hebrew text returns
fine from the server. HOWEVER when I run MyPage.jsp,
the Hebrew characters that are *included* from
MyIncludePage.jsp into MyPage.jsp are transformed
into question marks ("?").
Now, I suspect that for some reason, Tomcat doesn't
consider the encoding when it does executes an include
statement, but only on the request level.
I should say that I use Tomcat 3.2.1 on a Windows 2000
Professional system.
Best regards, and thanks,
Arik Kfir.