Problem displaying accents in Tomcat

2003-06-13 Thread Manuel Gonzalez
Hi everyone,

I have a problem with tomcat 4.1.24 with displaying vowels with accents 
and special spanish characters such as ntilde;.

The scenario is the following :

   - I have deployed a servlet application that accesses data on a 
MySQL database. The problem is that when displaying characters with 
accents or ntilde; they all appear as a question mark. But the fact is 
that they are correctly saved on the database, so the problem is not 
with the JDBC.
   - I am using Tomcat as a Stand-alone so, is acting as web server also.

   - The fact is that the same application has been running on Apache 
(Apache-tomcat) with no problem on displaying any character, but now I 
need it to be running directly on Tomcat as a web server.

   Any idea on what can be the problem, I am a bit desperate with this, 
I've been trying to find the solution for a long time now

   Thanks very much in advance

   Manuel

   [EMAIL PROTECTED]

  

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


RE: Problem displaying accents in Tomcat

2003-06-13 Thread Andy Chapman
This is really one for tomcat-user, but seeing as it's quiet...

I assume you HAD Apache (HTTP Server) and Tomcat hooked up with mod_jk
(or similar) previously and NOW you've just got Tomcat (4.1.24) on its
own.

Given that this is the case then something else has changed and is
causing this problem. What character encoding are you using in you web
app? Is it the same server machine that WAS working with Apache HTTP
Server and Tomcat? What OS are you running?


-Original Message-
From: Manuel Gonzalez [mailto:[EMAIL PROTECTED] 
Sent: 13 June 2003 12:17
To: [EMAIL PROTECTED]
Subject: Problem displaying accents in Tomcat


Hi everyone,

I have a problem with tomcat 4.1.24 with displaying vowels with accents 
and special spanish characters such as ntilde;.

The scenario is the following :

- I have deployed a servlet application that accesses data on a 
MySQL database. The problem is that when displaying characters with 
accents or ntilde; they all appear as a question mark. But the fact is 
that they are correctly saved on the database, so the problem is not 
with the JDBC.
- I am using Tomcat as a Stand-alone so, is acting as web server
also.

- The fact is that the same application has been running on Apache 
(Apache-tomcat) with no problem on displaying any character, but now I 
need it to be running directly on Tomcat as a web server.

Any idea on what can be the problem, I am a bit desperate with this,

I've been trying to find the solution for a long time now

Thanks very much in advance

Manuel

[EMAIL PROTECTED]

   


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


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



Re: Problem displaying accents in Tomcat

2003-06-13 Thread Manuel Gonzalez
Yes, your asumptsion is right. I had apache before hooked to Tomcat.
Now the application is running with Tomcat 4.1.24 on its own.
The OS is linux, SUSE distro.
The character encoding it should be the default one I haven't specified 
any. So it should be (iso-8859-1) ?

   Thanks

   Manuel

Andy Chapman wrote:

This is really one for tomcat-user, but seeing as it's quiet...

I assume you HAD Apache (HTTP Server) and Tomcat hooked up with mod_jk
(or similar) previously and NOW you've just got Tomcat (4.1.24) on its
own.
Given that this is the case then something else has changed and is
causing this problem. What character encoding are you using in you web
app? Is it the same server machine that WAS working with Apache HTTP
Server and Tomcat? What OS are you running?
-Original Message-
From: Manuel Gonzalez [mailto:[EMAIL PROTECTED] 
Sent: 13 June 2003 12:17
To: [EMAIL PROTECTED]
Subject: Problem displaying accents in Tomcat

Hi everyone,

I have a problem with tomcat 4.1.24 with displaying vowels with accents 
and special spanish characters such as ntilde;.

The scenario is the following :

   - I have deployed a servlet application that accesses data on a 
MySQL database. The problem is that when displaying characters with 
accents or ntilde; they all appear as a question mark. But the fact is 
that they are correctly saved on the database, so the problem is not 
with the JDBC.
   - I am using Tomcat as a Stand-alone so, is acting as web server
also.

   - The fact is that the same application has been running on Apache 
(Apache-tomcat) with no problem on displaying any character, but now I 
need it to be running directly on Tomcat as a web server.

   Any idea on what can be the problem, I am a bit desperate with this,

I've been trying to find the solution for a long time now

   Thanks very much in advance

   Manuel

   [EMAIL PROTECTED]

  

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



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


Re: Problem displaying accents in Tomcat

2003-06-13 Thread Sergio G. Reus

 Yes, your asumptsion is right. I had apache before hooked to Tomcat.
 Now the application is running with Tomcat 4.1.24 on its own.
 The OS is linux, SUSE distro.
 The character encoding it should be the default one I haven't specified 
 any. So it should be (iso-8859-1) ?
 
 Thanks
 
 Manuel
 

I've always used apache + tomcat and needed to add this
to CATALINA_OPTS variable when executing tomcat so that it
can display characters with tilde properly:

CATALINA_OPTS=-Dfile.encoding=ISO8859_15

I use ISO8859_15 both in tomcat and in my database because it also 
supports euro character.

Sergio.

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



RE: Problem displaying accents in Tomcat

2003-06-13 Thread Andy Chapman
There are two issues with character encoding. 

Firstly the charset used by Jasper for jsp source files, this is set in
Tomcat web.xml. The default is UTF-8 and will effect jsp source files
with special characters. From what I gather this isn't the problem, and
only really causes a problem with far-eastern charsets or where the OS
does not support UTF-8. 

The second is the HTTP Content Type. If you don't set this in a
jsp/servlet your text including unicode characters fetched from the db
will not be displayed properly ie using non-unicode ascii charset.

If you aren't setting the ContentType, you will need to either with a
tag:

%@ page contentType=text/html; charset=ISO-8859-1 %

or code:

%
  response.setContentType(text/html; charset=ISO-8859-1);
%

Why it worked before withou setting the content type I don't know, but I
hope that setting the content type as above solves your problem.


-Original Message-
From: Manuel Gonzalez [mailto:[EMAIL PROTECTED] 
Sent: 13 June 2003 12:50
To: Tomcat Developers List
Subject: Re: Problem displaying accents in Tomcat


Yes, your asumptsion is right. I had apache before hooked to Tomcat. Now
the application is running with Tomcat 4.1.24 on its own. The OS is
linux, SUSE distro. The character encoding it should be the default one
I haven't specified 
any. So it should be (iso-8859-1) ?

Thanks

Manuel

Andy Chapman wrote:

This is really one for tomcat-user, but seeing as it's quiet...

I assume you HAD Apache (HTTP Server) and Tomcat hooked up with mod_jk 
(or similar) previously and NOW you've just got Tomcat (4.1.24) on its 
own.

Given that this is the case then something else has changed and is 
causing this problem. What character encoding are you using in you web 
app? Is it the same server machine that WAS working with Apache HTTP 
Server and Tomcat? What OS are you running?


-Original Message-
From: Manuel Gonzalez [mailto:[EMAIL PROTECTED]
Sent: 13 June 2003 12:17
To: [EMAIL PROTECTED]
Subject: Problem displaying accents in Tomcat


Hi everyone,

I have a problem with tomcat 4.1.24 with displaying vowels with accents
and special spanish characters such as ntilde;.

The scenario is the following :

- I have deployed a servlet application that accesses data on a
MySQL database. The problem is that when displaying characters with 
accents or ntilde; they all appear as a question mark. But the fact is

that they are correctly saved on the database, so the problem is not 
with the JDBC.
- I am using Tomcat as a Stand-alone so, is acting as web server
also.

- The fact is that the same application has been running on Apache
(Apache-tomcat) with no problem on displaying any character, but now I 
need it to be running directly on Tomcat as a web server.

Any idea on what can be the problem, I am a bit desperate with 
 this,

I've been trying to find the solution for a long time now

Thanks very much in advance

Manuel

[EMAIL PROTECTED]

   


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


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

  




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


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