Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > JSTL, JSP, Struts. Do I have to use UTF-8 encoding?

Reply
Thread Tools

JSTL, JSP, Struts. Do I have to use UTF-8 encoding?

 
 
eeyimaya
Guest
Posts: n/a
 
      03-02-2005
Hi,

I am developing a web application in Turkish, with java and
encountered some encoding problems.

I think, I have to encode all my pages with utf-8 if I read my
contents from files(XML, ApplicationResources.properties... etc).???

When I used struts; I keep all my labels and messages in
ApplicationResources.properties file but Turkish characters are not
displayed even I used a filter that sets the encoding to ISO-8859-9. I
used the following to read from ApplicationResources.properties:
<bean:message key="link.employee.helloWorld"/>

When I used JSTL to read xml files, again Turkish characters are not
displayed.
I read XML with the following:

<c:import var="xml" url="/conf/menu.xml" />
<xarse var="dom" doc="${xml}" />
.....
<x:forEach var="menu" select="$dom/firma/menu" varStatus="status">
<x: out select="./@id" />
.....
</x:forEach>
......


I tried native2ascii tool with my struts application and problem is
solved. But since this is very tiring.(well, at least not practical
because my application is not an I18N application. only Turkish), I
did not try for JSTL.

So, I have 4 ways:

1) I don't use java (I want to use java)
2) I don't use xml, ApplicationResources.properties... files and write
my application as hard-coded.(very bad. I want to use design patterns)
3) I use native2ascii tool and convert my files to utf-8.(I don't know
if it works for JSTL but for struts it is an impractical solution)
4) I don't use JSTL, struts and only servlets and jsp.( then, why
these exist if they can't handle even a simple encoding)?
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Do I *have* to use 'OOP' to use modules? Merrilee Larson Perl Misc 41 11-25-2006 04:58 AM
Do I have to have the WEP # set for file sharing? =?Utf-8?B?SGVscCBtZSBJIGNhbicndCBzaGFyZSE=?= Wireless Networking 3 11-01-2005 05:37 AM
have you got any of these i can have spike240 Case Modding 4 09-14-2005 03:48 AM
do i have to have.... =?Utf-8?B?amFrZQ==?= Wireless Networking 1 03-11-2005 06:05 PM
do I have to have a windows OS to start a New pc when the mwssage no ntldr foun darinsray Microsoft Certification 0 04-24-2004 06:15 AM



Advertisments