Hello!
Does anyone know how can I set encoding for the request in struts webapp ?
I used ActionForward( path ). in the path variable I have some Chinese
Characters.
Thanks for any help in advance.
--
Thanks
-Yan.
If you're using a Servlet 2.3+ container, you can use a filter to set the
request's character encoding. An example implementaion is included with Tomcat.
For Tomcat 4.1 see:
$CATALINA_HOME/webapps/examples/WEB-INF/classes/filters/SetCharacterEncodingFilter.java
Or in CVS:
http://cvs.apache.org
Howdy,
I've got a strange problem with character encoding German characters.
I'm using iso-8859-1. The app is running on JDK 1.4.2, Jboss 3.2 w/
Tomcat and using Struts 1.1.
The application works fine on local Windows machine and on a Red Hat
system.
However, when moved to a Debian system
encoding issue
Howdy,
I've got a strange problem with character encoding German
characters. I'm using iso-8859-1. The app is running on JDK
1.4.2, Jboss 3.2 w/ Tomcat and using Struts 1.1.
The application works fine on local Windows machine and on a
Red Hat system.
However, when
Hi,
I have a web application that needs to support arabic, so I use UTF8 for
encoding:
%@ page language=java contentType=text/html; charset=UTF-8%
This leads to some characters beeing displayed wrong (works fine with
Latin-1), like the German 'Ü'. However I can mix them if I write them
like
[mailto:[EMAIL PROTECTED]
Verzonden: woensdag 1 oktober 2003 10:10
Aan: Struts Users Mailing List
Onderwerp: Character Encoding
Hi,
I have a web application that needs to support arabic, so I
use UTF8 for
encoding:
%@ page language=java contentType=text/html; charset=UTF-8%
This leads
Hi Remke,
thanks for the link to the tool, quite useful. The header is correct in
my case, though.
Here is a simple source example:
String original = new String(A'lü[\u05E9]);
String out1 = new String(original.getBytes(), UTF8);
out.println(Original: + original + br /UTF-8: );
Sounds suspiciously like your database isn't configured for UTF-8
-Original Message-
From: Stephan Wiesner [mailto:[EMAIL PROTECTED]
Sent: 01 October 2003 09:13
To: Struts Users Mailing List
Subject: Re: Character Encoding
Hi Remke,
thanks for the link to the tool, quite useful
Hi Stephan,
I think the attachment got stripped off by the list server.
On 10/01/2003 11:12 AM Stephan Wiesner wrote:
Hi Remke,
thanks for the link to the tool, quite useful. The header is correct in
my case, though.
Here is a simple source example:
String original = new String(A'lü[\u05E9]);
Hmh, so it seems. Can't present the result in plain text, but the
results are wrong and the usage of new String(original.getBytes(),
UTF8); leads to a different result.
Adam Hardy wrote:
Hi Stephan,
I think the attachment got stripped off by the list server.
On 10/01/2003 11:12 AM Stephan
On a page encoded with UTF-8, I am showing the proper ü and presumably
the correct character after it on the 'original' line, but in the second
line, I just get ? for both.
On 10/01/2003 01:22 PM Stephan Wiesner wrote:
Hmh, so it seems. Can't present the result in plain text, but the
results
PS The second character looks like a U, but the left hand upright is forked.
On 10/01/2003 01:22 PM Stephan Wiesner wrote:
Hmh, so it seems. Can't present the result in plain text, but the
results are wrong and the usage of new String(original.getBytes(),
UTF8); leads to a different result.
As part of localizing a site, I'm trying to set the content type of the response. Now
I now I can do this within the JSP (%@ page contentType=text/html; charset=UTF-8 %
).
But I'd rather do this globally. I found out that you can set this as a parameter of
the controller in struts. This would
System Analyst - Atos Origin
[EMAIL PROTECTED]
-Original Message-
From: Yann Lebreton [mailto:[EMAIL PROTECTED]
Sent: sexta-feira, 5 de setembro de 2003 13:46
To: [EMAIL PROTECTED]
Subject: [OT] Character Encoding
As part of localizing a site, I'm trying to set the content type
did you set the character encoding on the request before getting the data to the db ?
if you don't the input may be interpreted using the default JVM's encoding.
-Original Message-
From: José Gustavo Zagato [mailto:[EMAIL PROTECTED]
Sent: Friday, September 05, 2003 9:53 AM
To: 'Struts
Have a look here for an example of what you have to do to get the
response encoded correctly:
http://www.anassina.com/struts/i18n/i18n.html
Yann Lebreton wrote:
did you set the character encoding on the request before getting the data to the db ?
if you don't the input may be interpreted using
Yann Lebreton wrote:
As part of localizing a site, I'm trying to set the content type of the response. Now I now I can do this within the JSP (%@ page contentType=text/html; charset=UTF-8 % ).
But I'd rather do this globally. I found out that you can set this as a parameter of the controller in
Turns out, I was wrong. Java is doing the right thing. Thanks!
--
We have a situation where we've created a custom foo:include tag that
reads text from a file and writes it to the pageContext.getOut() JspWriter.
The problem is that the file is ISO-8859-1 (Latin 1)
We have a situation where we've created a custom foo:include tag that
reads text from a file and writes it to the pageContext.getOut() JspWriter.
The problem is that the file is ISO-8859-1 (Latin 1) encoded. When it gets
brought into a String (via any method you care to suggest), it gets
I've got big problem!!!
How to display simultaneously ISO-8859-2 characters on JSP page getting from DB and
ApplicationResources.properties file?
When I set in my JSP %response.setContentType(text/html; charset=iso-8859-2);%
then data from DB is displayed correctly, but all words from
[EMAIL PROTECTED] írta:
I tried to convert the file to utf-8 using native2ascii as
described in http://www.anassina.com/struts/i18n/i18n.html
but the problem remains.
native2ascii cannot convert to utf-8 afaik... it converts to ascii where
the not-ascii characters
will be exchanged with
On Mon, Mar 31, 2003 at 03:26:00PM +0200, Gemes Tibor wrote:
[EMAIL PROTECTED] ?rta:
I tried to convert the file to utf-8 using native2ascii as
described in http://www.anassina.com/struts/i18n/i18n.html
but the problem remains.
native2ascii cannot convert to utf-8 afaik... it converts to
[EMAIL PROTECTED] írta:
Also I forgot to write that when I tried the utf-8 encoding for the page
I got some strange symbols (like questionmarks)
in the browser. I thought that it might be the browser's fault and so
I tried to view the page with a couple of browers but none workedd.
Check
On Mon, Mar 31, 2003 at 03:55:16PM +0200, Gemes Tibor wrote:
[EMAIL PROTECTED] ?rta:
Also I forgot to write that when I tried the utf-8 encoding for the page
I got some strange symbols (like questionmarks)
in the browser. I thought that it might be the browser's fault and so
I tried to view
Kornilios Kourtis írta:
yes I set the encoding of the page (iso-8859-7)
and I even tried with telnet and verified that the server
sends question marks
How does ApplicationResources.properties look like? It should like this:
prompt.login=\ufeff\u038c\u03bd\u03bf\u03bc\u03b1
On Mon, Mar 31, 2003 at 04:36:57PM +0200, Gemes Tibor wrote:
Kornilios Kourtis ?rta:
yes I set the encoding of the page (iso-8859-7)
and I even tried with telnet and verified that the server
sends question marks
How does ApplicationResources.properties look like? It should like this:
Kornilios Kourtis wrote:
On Mon, Mar 31, 2003 at 03:55:16PM +0200, Gemes Tibor wrote:
[EMAIL PROTECTED] ?rta:
Also I forgot to write that when I tried the utf-8 encoding for the page
I got some strange symbols (like questionmarks)
in the browser. I thought that it might be the browser's fault
Kornilios Kourtis írta:
On Mon, Mar 31, 2003 at 04:36:57PM +0200, Gemes Tibor wrote:
it possible to be a tomcat problem?
(I'm using tomcat 4.1)
It works for me. I put together a small example, and displays everything
fine.
Try to set the content-type to text/html;charset=UTF-8. Maybe
Try using copy; instead of #169
http://www.ascii.cl/htmlcodes.htm
-Original Message-
From: Affan Qureshi [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 31, 2003 9:04 AM
To: struts-user
Subject: Setting Character Encoding (getting ? for ©)
I am having trouble displaying special
character
encoding. The default encoding is determined during virtual-machine startup
and typically depends upon the locale and encoding being used by the
underlying operating system.
The setting is available to Java in the System properties collection under
'file.encoding'. On English windoze it's
-Original Message-
From: Jackson, Stephen [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 03, 2003 12:50 PM
To: 'Struts Users Mailing List'
Subject: RE: Setting Character Encoding (getting ? for ©)
Try using copy; instead of #169
http://www.ascii.cl/htmlcodes.htm
-Original Message-
From
be behaving 'correctly' in this case.
Carlos
-Original Message-
From: Bueno Carlos M [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 03, 2003 3:01 PM
To: 'Struts Users Mailing List'
Subject: RE: Setting Character Encoding (getting ? for ©)
Hey Affan,
I don't have an explanation
I am having trouble displaying special characters and hence my web pages are
unable to render characters like the Trademark or Copyright symbols.
Initially I thought it was a Tomcat problem coz it was working fine in Resin
and Weblogic. But if I place the same file outside the Struts application
and upload file ,but it seems that forms with
enctype=multipart/form-data doesn't pass through servlet filters ( e.g.
setCharacterEncodingFilter to set the correct request character encoding),
which leads to wrong characters displayed, also ,as stated by struts upload
example ,it is IMPORTANT
Add a System.out.printlen to the do method of your filter, if nothing
happens then this is a bug of your web server.
We had used it without any problem with JRun 4.0.
WEB.XML
filter
filter-nameSet Character Encoding/filter-name
filter-classfoo.SetCharacterEncodingFilter/filter-class
)
at
org.apache.struts.action.ActionServlet.initApplicationPlugIns(ActionServlet.java
:991)
Also when i use Greek characters at the items of menu it displays ??
even i set corect character encoding at jsp.
Theodoridis Jim
--
To unsubscribe, e-mail: mailto:[EMAIL
at the items of menu it displays ??
even i set corect character encoding at jsp.
Theodoridis Jim
--
To unsubscribe, e-mail: mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]
--
To unsubscribe, e-mail: mailto:[EMAIL PROTECTED]
For additional commands, e
Menu and Character encoding problem
Hi,
Have you specify the characters encoding at the beginning of your xml
tiles config file:
?xml version=1.0 encoding=ISO-8859-1 ?
Cedric
Jim Theodoridis wrote:
Hi to all.
I use the following definition about a menu on tiles-defs.xml
Hi.
I use Greek messages on every JSP page. These messages are in a file
application_el_GR.properties.
I use a file tiles-defs.xml for all my pages which i
use a Layout (for example classicLayout.jsp). In the classicLayout.jsp i
configure %@ page contentType=text/html; charset=iso-8859-7 %
]
To: [EMAIL PROTECTED]
Sent: Sunday, December 29, 2002 1:24 PM
Subject: Character encoding problem
Hi.
I use Greek messages on every JSP page. These messages are in a file
application_el_GR.properties.
I use a file tiles-defs.xml for all my pages which i
use a Layout (for example
Probably I have a configuration problem with struts.
Since my native language is Turkish :-), I use Turkish messages
in everywhere JSPs, Action classes etc. But when ActionError (or
any other tag that use MessageResources) display errors in JSPs
they look unreadable.
For example, (sorry,
Hi,
My problem
(http://www.mail-archive.com/struts-user@jakarta.apache.org/msg28118.html)
solution was an easy one. I made stupid mistake at used setter which
re-encoded already properly encoded strings.
Peter
_
MSN Photos is
Searched the archives but could not find relevant answers.
This is JBoss 2.4.4 with Tomcat 3.2.3. Character encoding works fine both
for input*1 and output. I did verify this checking the database content and
displaying in JSP output without Struts help.
Now the problem is that Struts ignores
Subject: Failed to use a character encoding filter with struts
From: Tea Yu [EMAIL PROTECTED]
===
The simple SetCharacterEncoding filter accompanied with tomcat 4.0.2 is
configured as follows:
filter
filter-nameSet Character Encoding/filter-name
filter
doc
below for more detail) - The %@ page contentType=text/html; charset=UTF-8
% gets converted into a setContentType() call on the response object, this
has to occur before the output writer is retrieved from the pageContext,
otherwise the default character encoding is used. Some (web logic 6
Hello All
I have added the following to JSP files
META http-equiv=Content-Type content=text/html, charset=UTF-8
%@ page contentType=text/html; charset=UTF-8 %
html:html locale=true
Change the locale in an Action to iw_IL
And get:
Constant strings inserted in JSP in Hebrew are OK.
Just the
your properties file have to be written in Unicode encoding, not the native
encoding, or else java will screw your characters up, since java can only deal
with unicode
Hertzel Karbasi - OPTinity eBusiness Solutions wrote:
Hello All
I have added the following to JSP files
META
or you can covert your properties file strings from native to unicode using this
method
return new String(oldString.getBytes(), encoding);
where encoding is the native encoding u used in your properties file
more 'bout charset encoding/decoding on this page :
Polish chars in index.jsp are in iso-8859-2 not UTF-8!
Arek
-Original Message-
From: wojtek [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 23, 2002 10:19 PM
To: Struts Users Mailing List
Subject: Re: CHARACTER ENCODING !
Here it goes,
thanks for help.
Wojtek
]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Wednesday, January 23, 2002 10:05 PM
Subject: Re: CHARACTER ENCODING !
Ok Peter great, but I am using tomcat which gives this errror message when
setting encoding to utf-8
A Servlet Exception Has Occurred
of them is setCharacterEncoding
filter, which is what you need.
Feky
- Original Message -
From: timothy [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Thursday, January 24, 2002 4:02 AM
Subject: Re: CHARACTER ENCODING !
Hi Dennis Lee,
after you use
BINGO !!!
You are great Daigo!
Wojtek
- Original Message -
From: Daigo Moriwaki [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Thursday, January 24, 2002 3:07 AM
Subject: Re[2]: CHARACTER ENCODING !
Hi, wojetk
2002/01/24 Thu AM 05:53
wojtek [EMAIL
List [EMAIL PROTECTED]
Sent: Wednesday, January 23, 2002 10:51 AM
Subject: Re: CHARACTER ENCODING !
in JSP you should use page directive %@ page contentType=text/html;
charset=your encoding here %
and property files must be converted to acii (f.e. using
%JAVA_HOME%/bin/native2ascii.exe)
Feky
Mailing List [EMAIL PROTECTED]
Sent: Wednesday, January 23, 2002 10:51 AM
Subject: Re: CHARACTER ENCODING !
in JSP you should use page directive %@ page contentType=text/html;
charset=your encoding here %
and property files must be converted to acii (f.e. using
%JAVA_HOME%/bin/native2ascii.exe
)
at org.apache.jasper.compiler.JspReader.(Unknown Source)
at org.apache.jasper.compiler.Parser.(Unknown Source)
- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, January 23, 2002 9:55 PM
Subject: RE: CHARACTER ENCODING !
i've tested this with german/french
To: Struts Users Mailing List
Subject: Re: CHARACTER ENCODING !
Ok Peter great, but I am using tomcat which gives this errror message when
setting encoding to utf-8
A Servlet Exception Has Occurred
org.apache.jasper.compiler.ParseException: Cannot read file: ze file
Here it goes,
thanks for help.
Wojtek
head.jsp
Description: Binary data
index.jsp
Description: Binary data
--
Myslisz o otworzeniu wlasnego sklepu internetowego?
A moze o wynajeciu stoiska w wirtualnym pasazu?
W Centrum e-biznesu mozesz miec jedno i drugie. Juz od 290 zl za rok.
Hi, wojetk
2002/01/24 Thu AM 05:53
wojtek [EMAIL PROTECTED] wrote:
I am also setting request.setCharacterEncoding(ISO-8859-2) in
every possible place !
Where did you put it?
You should put it before request parameters are copied into actoinForm
properties.
You can make a subclass
Regards,
Dennis Lee
-Original Message-
From: Christopher Cheng [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 23, 2002 10:11 AM
To: Struts Users Mailing List
Cc: wojtek
Subject: RE: CHARACTER ENCODING !
Same here. I am building a site using English, Traditional and Simplified
Chinese
- Original Message -
From: Lee, Dennis [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Thursday, January 24, 2002 10:48 AM
Subject: RE: CHARACTER ENCODING !
Hi,
I have exactly the same problem.
I try to convert the chinese in the properties file
Hi,
I am using struts form some form validation (obvious isn't it?) and I came
across the following error:
National Polish characters returned from the forms are badly encoded !
I am using struts on win2k, jdk 1.3, the jsp page charset is set to
ISO-8859-2
Can anyone help ?
regards
Wojtek
:
Subject: CHARACTER ENCODING !
22/01/2002
17:00
62 matches
Mail list logo