Re: Encoding lsot when submitting a form on Tomcat 4.1.37

2008-10-27 Thread Kenneth Holm Nielsen
I switched to using UTF-8 and all looks fine in the html.

There's still a problem with validation messages from property files, but I
guess that is a different issue,
thanks for your help! :)

On Mon, Oct 13, 2008 at 7:12 PM, Nino Saturnino Martinez Vazquez Wael 
[EMAIL PROTECTED] wrote:

 Hi Kenneth

 I've seen on some occasions that IE 6 will loose content type if you
 specify UTF-8 as I remember it..

 And yeah why not use utf-8 ?


 Kenneth Holm Nielsen wrote:

 Hehe, yeah I know,

 I forgot to mention that I also override init in Application like so:

protected void init() {
this.getMarkupSettings().setDefaultMarkupEncoding(ISO-8859-1);

 I guess I'll just have to inform the customer that the chosen framework
 does
 not support latin-1.

 On Mon, Oct 13, 2008 at 3:23 PM, Johan Compagner [EMAIL PROTECTED]
 wrote:



 You shouldnt set the response like that i think. Please use the
 request setting default encoding. So that wicket also knows what you
 are using when the form comes back in (form submit)

 Why use that iso encoding, please, all the people of this world, start
 using only utf8 everywhere and drop all those other stupid encodings.


 On 10/13/08, Kenneth Holm Nielsen [EMAIL PROTECTED] wrote:


 I'm using the wicket distribution for java 1.4 on a Tomcat 4.1.37,

 my encoding to ISO-8859-1 is working fine until I submit a form.

 The text 'æbleø' is presented fine until I submit, afterwards the


 encoding


 for the entire document is lost and the text becomes 'æbleÃ',

 in a BasePage.java that all pages implement I have configured the


 response


 with ISO-8859-1 encoding.

protected void configureResponse() {
final String encoding = text/html; charset=ISO-8859-1;

getResponse().setContentType(encoding);
}

 On the BasePage.html I have added the following.

?xml version=1.0 encoding=ISO-8859-1?
!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN 
 http://www.w3.org/TR/html4/loose.dtd;
html lang=da
head
title wicket:id=pagetitle/title
meta http-equiv=Content-Type content=text/html;
 charset=ISO-8859-1

 The intial request, before submitting the form, has the correct Response
 headers.

url = http://localhost:8080/PGUI/?wicket:interface=:3
Server: Apache-Coyote/1.1
Content-Type: text/html;charset=ISO-8859-1
Content-Length: 2241
Date: Mon, 13 Oct 2008 09:36:00 GMT

 but the Response from a submit does not set the content-type:

url =



 http://localhost:8080/PGUI/?wicket:interface=:3:form::IFormSubmitListener
 ::


Server: Apache-Coyote/1.1
Location: http://localhost:8080/PGUI/?wicket:interface=:3
Content-Length: 0
Date: Mon, 13 Oct 2008 09:36:00 GMT

 In the conf/server.xml in tomcat I've even added
 'URIEncoding=*ISO-8859-1*'
 to the connector on port 8080.

 Despite all these hints, the browsers IE 7 and firefox 3, won't
 recognize
 the encoding.

 What am I missing?

 --
 regards,

 Kenneth Holm Nielsen

 khAn Computing

 http://www.kennethhn.dk
 http://www.kennethhn.blogspot.com
 http://www.linkedin.com/in/kennethhn



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]









 --
 -Wicket for love

 Nino Martinez Wael
 Java Specialist @ Jayway DK
 http://www.jayway.dk
 +45 2936 7684



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-- 
regards,

Kenneth Holm Nielsen

khAn Computing
Phone.: +45 26 96 73 28

http://www.kennethhn.dk
http://www.kennethhn.blogspot.com
http://www.linkedin.com/in/kennethhn


Encoding lsot when submitting a form on Tomcat 4.1.37

2008-10-13 Thread Kenneth Holm Nielsen
I'm using the wicket distribution for java 1.4 on a Tomcat 4.1.37,

my encoding to ISO-8859-1 is working fine until I submit a form.

The text 'æbleø' is presented fine until I submit, afterwards the encoding
for the entire document is lost and the text becomes 'æbleÃ',

in a BasePage.java that all pages implement I have configured the response
with ISO-8859-1 encoding.

protected void configureResponse() {
final String encoding = text/html; charset=ISO-8859-1;

getResponse().setContentType(encoding);
}

On the BasePage.html I have added the following.

?xml version=1.0 encoding=ISO-8859-1?
!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN 
http://www.w3.org/TR/html4/loose.dtd;
html lang=da
head
title wicket:id=pagetitle/title
meta http-equiv=Content-Type content=text/html;
charset=ISO-8859-1

The intial request, before submitting the form, has the correct Response
headers.

url = http://localhost:8080/PGUI/?wicket:interface=:3
Server: Apache-Coyote/1.1
Content-Type: text/html;charset=ISO-8859-1
Content-Length: 2241
Date: Mon, 13 Oct 2008 09:36:00 GMT

but the Response from a submit does not set the content-type:

url =
http://localhost:8080/PGUI/?wicket:interface=:3:form::IFormSubmitListener::
Server: Apache-Coyote/1.1
Location: http://localhost:8080/PGUI/?wicket:interface=:3
Content-Length: 0
Date: Mon, 13 Oct 2008 09:36:00 GMT

In the conf/server.xml in tomcat I've even added 'URIEncoding=*ISO-8859-1*'
to the connector on port 8080.

Despite all these hints, the browsers IE 7 and firefox 3, won't recognize
the encoding.

What am I missing?

-- 
regards,

Kenneth Holm Nielsen

khAn Computing

http://www.kennethhn.dk
http://www.kennethhn.blogspot.com
http://www.linkedin.com/in/kennethhn


Re: Encoding lsot when submitting a form on Tomcat 4.1.37

2008-10-13 Thread Kenneth Holm Nielsen
Hehe, yeah I know,

I forgot to mention that I also override init in Application like so:

protected void init() {
this.getMarkupSettings().setDefaultMarkupEncoding(ISO-8859-1);

I guess I'll just have to inform the customer that the chosen framework does
not support latin-1.

On Mon, Oct 13, 2008 at 3:23 PM, Johan Compagner [EMAIL PROTECTED]wrote:

 You shouldnt set the response like that i think. Please use the
 request setting default encoding. So that wicket also knows what you
 are using when the form comes back in (form submit)

 Why use that iso encoding, please, all the people of this world, start
 using only utf8 everywhere and drop all those other stupid encodings.


 On 10/13/08, Kenneth Holm Nielsen [EMAIL PROTECTED] wrote:
  I'm using the wicket distribution for java 1.4 on a Tomcat 4.1.37,
 
  my encoding to ISO-8859-1 is working fine until I submit a form.
 
  The text 'æbleø' is presented fine until I submit, afterwards the
 encoding
  for the entire document is lost and the text becomes 'æbleÃ',
 
  in a BasePage.java that all pages implement I have configured the
 response
  with ISO-8859-1 encoding.
 
  protected void configureResponse() {
  final String encoding = text/html; charset=ISO-8859-1;
 
  getResponse().setContentType(encoding);
  }
 
  On the BasePage.html I have added the following.
 
  ?xml version=1.0 encoding=ISO-8859-1?
  !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN 
  http://www.w3.org/TR/html4/loose.dtd;
  html lang=da
  head
  title wicket:id=pagetitle/title
  meta http-equiv=Content-Type content=text/html;
  charset=ISO-8859-1
 
  The intial request, before submitting the form, has the correct Response
  headers.
 
  url = http://localhost:8080/PGUI/?wicket:interface=:3
  Server: Apache-Coyote/1.1
  Content-Type: text/html;charset=ISO-8859-1
  Content-Length: 2241
  Date: Mon, 13 Oct 2008 09:36:00 GMT
 
  but the Response from a submit does not set the content-type:
 
  url =
 
 http://localhost:8080/PGUI/?wicket:interface=:3:form::IFormSubmitListener
 ::
  Server: Apache-Coyote/1.1
  Location: http://localhost:8080/PGUI/?wicket:interface=:3
  Content-Length: 0
  Date: Mon, 13 Oct 2008 09:36:00 GMT
 
  In the conf/server.xml in tomcat I've even added
  'URIEncoding=*ISO-8859-1*'
  to the connector on port 8080.
 
  Despite all these hints, the browsers IE 7 and firefox 3, won't recognize
  the encoding.
 
  What am I missing?
 
  --
  regards,
 
  Kenneth Holm Nielsen
 
  khAn Computing
 
  http://www.kennethhn.dk
  http://www.kennethhn.blogspot.com
  http://www.linkedin.com/in/kennethhn
 

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-- 
regards,

Kenneth Holm Nielsen

khAn Computing

http://www.kennethhn.dk
http://www.kennethhn.blogspot.com
http://www.linkedin.com/in/kennethhn