tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Alves <andref_al...@yahoo.com>
Subject a simple test to charset
Date Thu, 04 Jan 2001 20:06:26 GMT
I, made the following test:
import java.io.*;
import java.text.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;

public class HelloWorldExample extends HttpServlet
{
  public void doGet(HttpServletRequest request, HttpServletResponse
response) throws IOException, ServletException
  {
    String strName = request.getParameter("name"); 
    response.setContentType("text/html");
    PrintWriter out = response.getWriter();

    out.println("<html>");
    out.println("<head>");
    out.println("</head>");
    out.println("<body bgcolor=\"white\">");
    out.println("<body>");
    out.println("start");
    out.println("<br>");
    out.println("Name = "+strName);
    out.println("<br>");
    out.println("end");
    out.println("</body>");
    out.println("</html>");
  }
}

And I invoke this servlet with the url:
http://my_ip/servlet/HelloWorldExample?name=André

The html responde is:

start
Name: Andr
end

Tomcat did not catch special caracter "é". 

__________________________________________________
Do You Yahoo!?
Yahoo! Photos - Share your holiday photos online!
http://photos.yahoo.com/

Mime
View raw message