Hello all,
I'm working for a bilingual organization so I have to support french 
(my mother tongue) in my applications and other funny characters from 
users of other countries.
For some reasons I have no problem to set character st with servlets 
but I do with jsp's. 
I mocked up a very simple example that failles miserably on my setup 
(Jrun3.0 sp1 on NT4 server)
:

the following service in a test servlet :
<start code>
    public void service  (HttpServletRequest req, HttpServletResponse 
res)
            throws ServletException, IOException{

              org.wcoomd.web.WebUser user  = new 
org.wcoomd.web.WebUser ();
              user.load(176);

              String aString = user.getFirstname()+" "+user.getSurname
() ;
              ServletOutputStream out= res.getOutputStream() ;
              res.setContentType("text/html; charset=UTF8");
              out.println("<html><body>");
              out.println("<p>"+aString+"</p>") ;
              out.println("</body></html>");
              out.close();
    }
<end code>
properly show the accentuated chars nin a user's name

but the following jsp
<start code>
<%@ page contentType = "text/html; charset=UTF8" %>
<html>
<head>
</head>
<body>
<p><%
        org.wcoomd.web.WebUser user  = new org.wcoomd.web.WebUser ();
        user.load(176);
        String aString = user.getFirstname()+" "+user.getSurname() ;

%><%= aString%></p>

</body>
</html>
<end code>
shows the character encoding for the accentuad chars.

I had a look at the generated java, but sorry I can't find
the problem,
thanks for your support,
Philippe



+ + + + +++ + + + + + + + + + + + + + + + +  ++ + +  + + + + + +++
Philippe Bertramo
5, rue d'Oradour L-2266 Luxembourg
GSM : +352091461365

______________________________________________________________________
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to