users@glassfish.java.net

Re: RE: character encoding

From: <glassfish_at_javadesktop.org>
Date: Sun, 16 May 2010 19:32:43 PDT

In GlassFish i have changed this now below here. Under each listeners both for Network Listeners and Protocols there are an HTTP tab and under that one i have change this,

[b]Network Config[/b]

[b]Network Listeners[/b]
http-listeners-1
http-listeners-2
admin-listeners

[b]Protocols[/b]
http-listeners-1
http-listeners-2
admin-listeners

URI Encoding: UTF-8

Default Response Type: text/plain; charset=UTF-8

Forced Response Type: text/plain; charset=UTF-8


So when i run curl in a terminal window i get this response:

Macintosh:~ jespernyqvist$ curl -I http://neptunediving.com/neptune/index.jsp
HTTP/1.1 200 OK
Date: Mon, 17 May 2010 04:14:17 GMT
Server: GlassFish v3
X-Powered-By: JSP/2.1
Content-Type: text/html;charset=UTF-8
Content-Language: en-US
Transfer-Encoding: chunked
Set-Cookie: JSESSIONID=478269c08e050484d1d6fa29fc44; Path=/neptune

As you can see now my HTTP Header is looking good, no more charset=iso-8859-1. The only problem i have here is that there is no space in between text/html;charset=UTF-8. I think this should be like this instead or not, text/html; charset=UTF-8? I have noticed that they are very case sensitive so maybe this is a problem for me?


On top of my header i have this;

<%_at_page import="com.neptunediving.*"%>
<%_at_include file="WEB-INF/include/LangSupport.jsp"%>
<%_at_page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>

In my header i have this;

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />


I have changed in the preferences for Eclipse to use UTF-8. I have gone thru all properties files in my project and changed them to UTF-8 also. So what else are they to change?


Still my page is nor displayed properly, now in all browsers like Safari, Firefox, Opera and Internet Explorer. So what is wrong with my page since this don't work for me? Can anybody please explain this to me?
[Message sent by forum member 'torleif67']

http://forums.java.net/jive/thread.jspa?messageID=470076