Character encoding in JSP/servlet
October 26, 2005 on 4:58 pm | In Java |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: Java, JSP, servlet
Related Posts:
- Rapid web development
- MVC framework (again!)
- Using Apache Axis in NetBeans 5.0
- How to Format Dates for SQL in Java
No Comments yet »
RSS feed for comments on this post.
Leave a comment
Powered by blog.mu with Pool theme design by Borja Fernandez.

