----- Original Message ----- From: "Lin, Yaxiong" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, March 08, 2002 3:06 PM Subject: RE: Illegal control character error
> > John: > > I am still trying to debug this problem, but I want to share with you what I > have found on the newsgroup about the usage of getOutputStream and > getPrintWriter. The guy reported that on IBM webSphere, getOutputStream > would return different output object depends on how the servlet is called. > If it's called directly from the browser, it would return > sun.servlet.http.HttpOutputStream, and if called from a JSP inside > websphere, it would return com.ibm.servlet.PageCompilePCServletOutputStream. > On the later case, the char would not be encoded correctly. He also > reported that the output object returned from getPrintWriter always encode > the char correctly. > > So, with this information, I was wondering if getPrintWriter should be used > to obtain the i/o object to make the code more robustic? That's very interesting - it would be worth trying this. If the wrong encoding mechanism is used then it would certainly explain the error you are seeing. John Wilson The Wilson Partnership http://www.wilson.co.uk
