Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_jsp thread: JspWriter


Message #1 by "Thomas Wai" <thomaswai@s...> on Thu, 10 May 2001 08:54:17
Dear all,

     I try to use JspWriter and print out some UTF-8 characters on the jsp 
file through the bean. But, I have a encoding problem. Those characters 
become the thing which no one can understand. Please help.

* I aleady set the content-type

That's the code I write:

In the bean:
    
public String processRequest(HttpServletRequest req, HttpServletResponse 
res, JspWriter out) throws IOException {

        res.setContentType("text/html; charset=UTF-8");        
        out.write("some UTF-8 characters here");

            

In the jsp file:
<% tapeSearchBean.processRequest(request,response,out); %> 


Thanks again.

Cheers,

Thomas


  Return to Index