Character encoding in JSP/servlet

October 26, 2005 on 4:58 pm | In Java | Add a comment

To resolve character encoding problems, such as incorrect display of special characters, in Java Server Pages and servlets, follow the steps outlined below.

# Find out what character encoding is used by a) your request and b) your response with
<%= request.getCharacterEncoding() %>
<%= response.getCharacterEncoding() %>
.
# If two different encodings are used, you can force both to use the same encoding with the setCharacterEncoding() method.

To make your task easier, you would ideally be setting both to use UTF-8.

Technorati Tags: , ,

Related Posts:

BerkeleyDB database

October 19, 2005 on 1:38 pm | In Java | 2 comments

If I was building a hypothetical database solution to provide fast sequential access to data, I would choose BerkeleyDB.

Technorati Tags:

Related Posts:




Powered by blog.mu with Pool theme design by Borja Fernandez.