tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 24385] New: - text conversion fails with jsp:forward/param on linux server
Date Tue, 04 Nov 2003 13:36:07 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24385>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24385

text conversion fails with jsp:forward/param on linux server

           Summary: text conversion fails with jsp:forward/param on linux
                    server
           Product: Tomcat 4
           Version: 4.1.27
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Jasper 2
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: urs.gloor@bit.admin.ch


In a combination of tomcat on a linux server and IE or Mozilla on a windows 
client you get a wrong character conversion. In the following example you call 
test1.jsp, the parameter value shown in test2.jsp is in UTF-8 instead of ISO-
8859-1.

test1.jsp
-----------------------------------------------------------------
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" %>
<jsp:forward page="test2.jsp">
  <jsp:param name="param01" value='Test Umlaut Ä-Ö-Ü-ä-ö-ü' />
</jsp:forward>
-----------------------------------------------------------------

test2.jsp
-----------------------------------------------------------------
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" %>
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type">
    <title>Test Umlaut Ä-Ö-Ü-ä-ö-ü</title>
  </head>
  <body>
    <p>Template Text: Test Umlaut Ä-Ö-Ü-ä-ö-ü</p>
    <p>Text from Parameter: <%= request.getParameter("param01") %></p>
    <p>Text from Parameter (Workaround): <%= new String(request.getParameter
("param01").getBytes("ISO-8859-1")) %></p>
  </body>
</html>
-----------------------------------------------------------------

Result
-----------------------------------------------------------------
Template Text: Test Umlaut Ä-Ö-Ü-ä-ö-ü
Text from Parameter: Test Umlaut Ä-Ö-Ü-ä-ö-ü
Text from Parameter (Workaround): Test Umlaut Ä-Ö-Ü-ä-ö-ü
-----------------------------------------------------------------

Doesn't occur in template texts or in parameters, which are filled in a HTML 
form.
Doesn't occur with tomcat on windows server and browser on windows client.

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message