Problem 1:
I use a submit form to call the GuestBookServlet, the form has a text field "name", the servlet can get the parameter value of "name" when it only contains 8-bit code, but when it contains 16-bit code (Simple Chinese Code "GB2312"), getParameter("name") is ?? , ie, one 16-bit code is placed with one ?? . I find the NC browser's Location toolbar show the correct 16-bit code of the "firstname" field: "http://server:8000/servlet/GuestBookServlet?name=%B7%A2&ok=ok" .
I use a submit form to call the GuestBookServlet, the form has a text field "name", the servlet can get the parameter value of "name" when it only contains 8-bit code, but when it contains 16-bit code (Simple Chinese Code "GB2312"), getParameter("name") is ?? , ie, one 16-bit code is placed with one ?? . I find the NC browser's Location toolbar show the correct 16-bit code of the "firstname" field: "http://server:8000/servlet/GuestBookServlet?name=%B7%A2&ok=ok" .
The
GuestBookServlet:
"
...
response.setContentType("text/html; charset=GB2312");
String name = request.getParameter("name");
...
"
"
...
response.setContentType("text/html; charset=GB2312");
String name = request.getParameter("name");
...
"
problem 2:
CharsetForm is a example which uses package "com.oreilly.servlet", when I run the servlet , occurs "Bundle could not be found.", why?
CharsetForm is a example which uses package "com.oreilly.servlet", when I run the servlet , occurs "Bundle could not be found.", why?
I joined the servlet-users about 10 days ago, I
have browsed the old mails, but seldom found the i18n questions, except Shashank
and Yoko have talked about it. Maybe servlet i18n question is the old and
resolved question, anyone give me the resolving pointers ? Thanks.
Jack
