
Hi, I am retriving description field from DB as this st = conn.prepareStatement("SELECT description,assetid FROM assetdb.assets a where assetid=1299581636"); The description field value is "Where ââ?¬Å?in-countryââ?¬Â? hosting solutions are part of the contract requirement" My requirement is to display it in jsp like "Where "in-country" hosting solutions are part of the contract requirement"
My approach is
public String getAsset() { byte[] b = rs.getBytes("description"); utf8Str = new String(b, "UTF-8"); ... }
request.setCharacterEncoding("UTF-8"); response.setCharacterEncoding("UTF-8"); DBUtils db= new DBUtils() String utf8Str = db.getAsset(); HttpSession session = request.getSession(true); session.setAttribute("descrption", utf8Str);
<%@page contentType="text/html" pageEncoding="UTF-8"%>
But I m nt able to display it properly...please help