?
Solved

Pass an Hewbrew parameters via post to JSP

Posted on 2003-03-05
10
Medium Priority
?
347 Views
Last Modified: 2010-08-05
When i try to pass parameters using METHOD POST
to new jsp file

the new jsp file
show the value of the Hebrew param as ?

How can i reacive the correct Hebrew param

i using the get the Request.getParam("myparam")

Regards
Neta
0
Comment
Question by:neta
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
10 Comments
 
LVL 4

Expert Comment

by:thanassis
ID: 8071031
You must install Hebrew fonts in the machine that runs your server
0
 

Expert Comment

by:richiegr
ID: 8072118
Hi

The best solution to work is to work with UTF-8 encoding
from the jsp page to the database or whatever
Do not beginning to play with different hebrew encoding cp1255 or ISO it's more difficult and don't give nothing.

Bye
0
 
LVL 14

Accepted Solution

by:
kennethxu earned 800 total points
ID: 8072480
first you must decide which char-encoding you want to use, i would suggest to use utf-8:

in every jsp page you need:
<%@ page contentType="text/html; charset=UTF-8" %>
in every html page you need this line in your html <head>:
<META HTTP-EQUIV="CONTENT-TYPE"CONTENT="TEXT/HTML;CHARSET=UTF-8">

if your server supports servlet 2.3, use:
request.setCharacterEncoding( "UTF-8" );
before you use any request.getParameter call.

if your server doesn't support 2.3, use this:

<%
String encoding = request.getCharacterEncoding();
if( encoding == null ) encoding = "ISO-8859-1";
String myString = request.getParameter( "xxx" );
if( myString != null ) myString = new String( myString.getBytes( encoding ), "UTF-8" );
%>
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 14

Expert Comment

by:kennethxu
ID: 8072501
if you must use other encoding, replace "UTF-8" with the encoding you want to use in my previous comment. let me know if you have futher enquires.
0
 
LVL 19

Expert Comment

by:cheekycj
ID: 8073785
richiegr is right, use UTF-8 encoding in your JSP and it should work.

CJ
0
 
LVL 14

Expert Comment

by:kennethxu
ID: 8074541
>> richiegr is right, use UTF-8 encoding in your JSP and it should work.
cannot 100% agree, sometime you have not choice when your datebase is already setup for encoding other then utf-8. utf-8 is the easiest to work with, but doesn't mean it is the only choice.
0
 
LVL 19

Expert Comment

by:cheekycj
ID: 8074576
No, but it is the probably the best when dealing with internationalization and other character sets.

CJ
0
 
LVL 14

Expert Comment

by:kennethxu
ID: 8074828
if you have freedom to select an encoding, I agree that utf-8 should be the first candidate to consider. but when environment doesn't allow, say existing database and exsiting encoded files/pages. Other encodings are just working fine. At least, I have been working with varies encoding all the time.
0
 

Author Comment

by:neta
ID: 8075036
Thank you all
richiegr my jsp does not suport the UTF-8
so i choosed kennethxu  answer as the right one

Best to all
Neta
0
 
LVL 14

Expert Comment

by:kennethxu
ID: 8075251
pleasure to help and good luck!
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

An introduction to the wonderful sport of Scam Baiting.  Learn how to help fight scammers by beating them at their own game. This great pass time helps the world, while providing an endless source of entertainment. Enjoy!
The top devops trends for 2017 are focused on improved deployment frequency, decreased lead time for change and decreased MTTR.
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question