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=13692>.
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=13692

request.getCharacterEncoding() is NULL

           Summary: request.getCharacterEncoding() is NULL
           Product: Tomcat 4
           Version: 4.1.12
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Jasper 2
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


I am a multi-charset user.
I used Resin to be my JSP-container befor.
After I try to use Tomcat to instead of Resin, it's bother with me that Tomcat 
can not transfer the charset to the type that I assigned.
So I try to figure out what happened.
In Tomcat 4.1.12, I try to modify this file 
org.apache.jasper.compiler.Generator.java.
In line 460-470 , I try to print the request.getCharacterEncoding().

Like these code,

out.printin("response.setContentType(");
out.print  (quote(pageInfo.getContentType()));
out.println(");");

// modify by Simon Chung 10/16/2002
// [EMAIL PROTECTED]
// fix request.getCharacterEncoding() is equal to 'null'.
// request.setCharacterEncoding(response.getCharacterEncoding());
out.printil("System.out.println(request.getCharacterEncoding());");
out.printil("request.setCharacterEncoding(response.getCharacterEncoding());");
out.printil("System.out.println(request.getCharacterEncoding());");
// end of modify

out.printil("pageContext = _jspxFactory.getPageContext(this, request, 
response,");

And find that the first System.out is null.
And the second System.out is the type that I assigned.

OK. Got it!

The 'request' and 'response' charset-encoding are not same.

So I try to fix my jasper-compiler.jar.
And it works very good.

Then I reponse this bug to you now.

Please give me a notice what you want to do.

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to