You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Yair Zohar <ya...@ard.huji.ac.il> on 2003/09/15 17:01:17 UTC
A Hebrew Problem
Hello,
I have this hebrew problem:
I'm trying to include a html in a jsp page: <jsp:include
page="relativePath/fileName" flush="true" />
When it comes to a hebrew html the browser displays question marks
instead of hebrew
(no matter what charset do I choose in the browser).
The same html is viewed nicely when I get it directly as a file or when
I copy it to the apache html directory
and view it by apache (charset=Windows-1255).
System: RH9 with tomcat-4.1.18, mod_jk-2.0.43, apache-2.0.44, j2sdk1.4.2
It all works fine on an old server: RH7.1 tomcat-4.0.4 apache-1.3
mysql-connector-java-3.0.7 j2sdk1.4.0_03
Does anyone can give a solution or a direction ?
Thanks,
Yair
Re[2]: A Hebrew Problem
Posted by Anton Tagunov <at...@mail.cnt.ru>.
Hello Yair!
Sorry about responding with such delay, I only read the list
periodically in large gulps. I'm still very interested.
YZ> My Goal: including a hebrew html inside a jsp page.
YZ> The Problem: hebrew is viewed by browser as question marks (no matter
YZ> charset).
YZ> //moving the html string to a char array.
YZ> <%char [] c = pageExecuter.readHtml().toCharArray();
YZ> for (int i=0; i<c.length; i++){%>
YZ> //displaying 'character code' 'character'
YZ> <%= (int)c[i] %>; <%= c[i] %><br>
YZ> <% } %>
A very correct experiment!
YZ> in that way I can see in the browser each character's code and the
YZ> character itself.
I'm afraid I did not understand your description.
Could you attache the whole page resulting from this experiment?
Or still better the result of
wget -s -o file.html http://your.page.somewhere/some.jsp
from this page? (I want to see the Content-Type that gets
generated, the codes you get from the (int) conversion and
wether the byte(s) generated by <%= c[i] %> are really question
marks (0x3F) or something else.) Again attaching the result
of wget would be better then any description.
Thanks for interesting food for investigation, Yair! :-)
Anton
Re[2]: A Hebrew Problem
Posted by Anton Tagunov <at...@mail.cnt.ru>.
Hello Yair!
Sorry about responding with such delay, I only read the list
periodically in large gulps. I'm still very interested.
YZ> My Goal: including a hebrew html inside a jsp page.
YZ> The Problem: hebrew is viewed by browser as question marks (no matter
YZ> charset).
YZ> //moving the html string to a char array.
YZ> <%char [] c = pageExecuter.readHtml().toCharArray();
YZ> for (int i=0; i<c.length; i++){%>
YZ> //displaying 'character code' 'character'
YZ> <%= (int)c[i] %>; <%= c[i] %><br>
YZ> <% } %>
A very correct experiment!
YZ> in that way I can see in the browser each character's code and the
YZ> character itself.
I'm afraid I did not understand your description.
Could you attache the whole page resulting from this experiment?
Or still better the result of
wget -s -o file.html http://your.page.somewhere/some.jsp
from this page? (I want to see the Content-Type that gets
generated, the codes you get from the (int) conversion and
wether the byte(s) generated by <%= c[i] %> are really question
marks (0x3F) or something else.) Again attaching the result
of wget would be better then any description.
Thanks for interesting food for investigation, Yair! :-)
Anton
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: A Hebrew Problem
Posted by Yair Zohar <ya...@ard.huji.ac.il>.
After some investigation I'll try to refrase and improve my problem
description:
My Goal: including a hebrew html inside a jsp page.
The Problem: hebrew is viewed by browser as question marks (no matter
charset).
Some details from my investigation:
When I request the hebrew html directly (not included in a jsp but as
the request target itself) I see it right (charset=windows-1255).
When writing hebrew (same charset) in the same jsp page (that has the
include action) I see it right (but the included html is still ????).
To be sure it's not the 'include' action (<jsp:include
page="relativePath/fileName" flush="true" />) fault, I replaced it by a
function that returns the included page as a string and ensures it's
read in ascii:
<%= pageExecuter.readHtml() %>
when this didn't help, I wanted to be sure my function is returning the
jsp page an ascii string, I wrote this in the jsp page:
//moving the html string to a char array.
<%char [] c = pageExecuter.readHtml().toCharArray();
for (int i=0; i<c.length; i++){%>
//displaying 'character code' 'character'
<%= (int)c[i] %>; <%= c[i] %><br>
<% } %>
in that way I can see in the browser each character's code and the
character itself.
I've got ascii codes, but near the hebrew ascii codes there were '?'
(I'm aware of the different hebrew ascii sets exists I tried both
224-250 , 128 - 154 )
My conclusion:
Tomcat doesn't send the browser a response with ascii code but with some
other code.
Any Idea ?
Thanks for your efforts.
Anton Tagunov wrote:
> Hello Yair!
>
> YZ> I have this hebrew problem:
> YZ> I'm trying to include a html in a jsp page:
> YZ> <jsp:include page="relativePath/fileName" flush="true" />
> YZ> When it comes to a hebrew html the browser displays question marks
> YZ> instead of hebrew (no matter what charset do I choose in the browser).
>
> YZ> The same html is viewed nicely when I get it directly as a file
>
>
> 1)
>
> Do I get you right that you have
>
> web-app-root/some/a.jsp
> web-app-root/other/b.html
>
> and when you do
>
> http://www.myserver.some-domain/my-web-app/other/b.html
>
> you get something real, not question marks?
>
> 2)
>
> I vagually recall some talks about this being a JSP spec limitation
> on the list, but I did not delve into the topic then.
>
> I also recall that the it was mentioned then that the new
> spec-compliant but unconvinient behavior has been introduced
> recently.
>
> Anyone, any tips?
>
> (nagoya.apache.org eyebrowse search is not too much responsive when
> searching tomcat-dev, and tomcat-user is not indexed at all :-(
>
> YZ> System: RH9 with tomcat-4.1.18, mod_jk-2.0.43, apache-2.0.44, j2sdk1.4.2
> YZ> It all works fine on an old server: RH7.1 tomcat-4.0.4 apache-1.3
> YZ> mysql-connector-java-3.0.7 j2sdk1.4.0_03
>
> Anton
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
>
Re: A Hebrew Problem
Posted by Yair Zohar <ya...@ard.huji.ac.il>.
After some investigation I'll try to refrase and improve my problem
description:
My Goal: including a hebrew html inside a jsp page.
The Problem: hebrew is viewed by browser as question marks (no matter
charset).
Some details from my investigation:
When I request the hebrew html directly (not included in a jsp but as
the request target itself) I see it right (charset=windows-1255).
When writing hebrew (same charset) in the same jsp page (that has the
include action) I see it right (but the included html is still ????).
To be sure it's not the 'include' action (<jsp:include
page="relativePath/fileName" flush="true" />) fault, I replaced it by a
function that returns the included page as a string and ensures it's
read in ascii:
<%= pageExecuter.readHtml() %>
when this didn't help, I wanted to be sure my function is returning the
jsp page an ascii string, I wrote this in the jsp page:
//moving the html string to a char array.
<%char [] c = pageExecuter.readHtml().toCharArray();
for (int i=0; i<c.length; i++){%>
//displaying 'character code' 'character'
<%= (int)c[i] %>; <%= c[i] %><br>
<% } %>
in that way I can see in the browser each character's code and the
character itself.
I've got ascii codes, but near the hebrew ascii codes there were '?'
(I'm aware of the different hebrew ascii sets exists I tried both
224-250 , 128 - 154 )
My conclusion:
Tomcat doesn't send the browser a response with ascii code but with some
other code.
Any Idea ?
Thanks for your efforts.
Anton Tagunov wrote:
> Hello Yair!
>
> YZ> I have this hebrew problem:
> YZ> I'm trying to include a html in a jsp page:
> YZ> <jsp:include page="relativePath/fileName" flush="true" />
> YZ> When it comes to a hebrew html the browser displays question marks
> YZ> instead of hebrew (no matter what charset do I choose in the browser).
>
> YZ> The same html is viewed nicely when I get it directly as a file
>
>
> 1)
>
> Do I get you right that you have
>
> web-app-root/some/a.jsp
> web-app-root/other/b.html
>
> and when you do
>
> http://www.myserver.some-domain/my-web-app/other/b.html
>
> you get something real, not question marks?
>
> 2)
>
> I vagually recall some talks about this being a JSP spec limitation
> on the list, but I did not delve into the topic then.
>
> I also recall that the it was mentioned then that the new
> spec-compliant but unconvinient behavior has been introduced
> recently.
>
> Anyone, any tips?
>
> (nagoya.apache.org eyebrowse search is not too much responsive when
> searching tomcat-dev, and tomcat-user is not indexed at all :-(
>
> YZ> System: RH9 with tomcat-4.1.18, mod_jk-2.0.43, apache-2.0.44, j2sdk1.4.2
> YZ> It all works fine on an old server: RH7.1 tomcat-4.0.4 apache-1.3
> YZ> mysql-connector-java-3.0.7 j2sdk1.4.0_03
>
> Anton
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: A Hebrew Problem
Posted by Anton Tagunov <at...@mail.cnt.ru>.
Hello Yair!
YZ> I have this hebrew problem:
YZ> I'm trying to include a html in a jsp page:
YZ> <jsp:include page="relativePath/fileName" flush="true" />
YZ> When it comes to a hebrew html the browser displays question marks
YZ> instead of hebrew (no matter what charset do I choose in the browser).
YZ> The same html is viewed nicely when I get it directly as a file
1)
Do I get you right that you have
web-app-root/some/a.jsp
web-app-root/other/b.html
and when you do
http://www.myserver.some-domain/my-web-app/other/b.html
you get something real, not question marks?
2)
I vagually recall some talks about this being a JSP spec limitation
on the list, but I did not delve into the topic then.
I also recall that the it was mentioned then that the new
spec-compliant but unconvinient behavior has been introduced
recently.
Anyone, any tips?
(nagoya.apache.org eyebrowse search is not too much responsive when
searching tomcat-dev, and tomcat-user is not indexed at all :-(
YZ> System: RH9 with tomcat-4.1.18, mod_jk-2.0.43, apache-2.0.44, j2sdk1.4.2
YZ> It all works fine on an old server: RH7.1 tomcat-4.0.4 apache-1.3
YZ> mysql-connector-java-3.0.7 j2sdk1.4.0_03
Anton
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: A Hebrew Problem
Posted by Anton Tagunov <at...@mail.cnt.ru>.
Hello Yair!
YZ> I have this hebrew problem:
YZ> I'm trying to include a html in a jsp page:
YZ> <jsp:include page="relativePath/fileName" flush="true" />
YZ> When it comes to a hebrew html the browser displays question marks
YZ> instead of hebrew (no matter what charset do I choose in the browser).
YZ> The same html is viewed nicely when I get it directly as a file
1)
Do I get you right that you have
web-app-root/some/a.jsp
web-app-root/other/b.html
and when you do
http://www.myserver.some-domain/my-web-app/other/b.html
you get something real, not question marks?
2)
I vagually recall some talks about this being a JSP spec limitation
on the list, but I did not delve into the topic then.
I also recall that the it was mentioned then that the new
spec-compliant but unconvinient behavior has been introduced
recently.
Anyone, any tips?
(nagoya.apache.org eyebrowse search is not too much responsive when
searching tomcat-dev, and tomcat-user is not indexed at all :-(
YZ> System: RH9 with tomcat-4.1.18, mod_jk-2.0.43, apache-2.0.44, j2sdk1.4.2
YZ> It all works fine on an old server: RH7.1 tomcat-4.0.4 apache-1.3
YZ> mysql-connector-java-3.0.7 j2sdk1.4.0_03
Anton