Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to insert japanese data from a jsp to DB2

 
Nitin Jengte
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to insert japanese data from jsp. In the jsp I have one field and I am copying a japanese text in it and then posting this request to DB2.
When I am trying to retrieve this data in another jsp, I am getting junk(???).
Pl. help me to solve this problem.
Thanks in advance
Regards
Nitin
 
sachin kotgire
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try this code in your JSP
<%
String s1 = request.getParameter("param");
s1 = new String(s1.getBytes("ISO-8859-1"), "UTF-8");
%>
the string s1 will have your japanese character data. You can use this string to insert into the database.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic