This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to Set Character Encodeing in JSP

 
ramakrishna rayudu
Ranch Hand
Posts: 57
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi..

i have JSP like This Can you help me how to set the character encodeing.


<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN"
"http://www.wapforum.org/DTD/xhtml-mobile12.dtd" >
<%@taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html"%>
<%@taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic"%>
<%@taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean"%>


<html:html locale="true" >
<head>
<meta name="keywords" content="HTML,CSS,XML,JavaScript" />
<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
<title><bean:message key="headertitle.text"/></title>
<link rel="stylesheet"
href="<%=request.getContextPath()%>/css/style.css"></link>
<script src="scripts/helpcontent.js"></script>

i am useing the <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
but i am unable to set the encodeing type to UTF-8
again i need to go to Browser Settings and i need to select the Encodeing Type.
is there any way that i need to set the browser character encoding to UTF_8 when the page is loding???

Example i have seen is google Home Page.when the Google Home Page Loding it will Automtically setting Browser the character Encoding tom UTF-8



Thanks,
Ramakrishna rayudu.




















 
sudhir nim
Ranch Hand
Posts: 212
Eclipse IDE Spring Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use the contentType attribute of the page directive to set the charset for the response.

 
ramakrishna rayudu
Ranch Hand
Posts: 57
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have used the Page Directive Tag all so but no use.
 
sudhir nim
Ranch Hand
Posts: 212
Eclipse IDE Spring Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you tried this.

 
ramakrishna rayudu
Ranch Hand
Posts: 57
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes.i have all so tried that.but i need to do the same think.i need to go to the Browser i and need to set the Character first
 
sudhir nim
Ranch Hand
Posts: 212
Eclipse IDE Spring Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What charset are you trying to display? I mean which language the response is in.
 
ramakrishna rayudu
Ranch Hand
Posts: 57
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
it is wokring for all but not for Hindi
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic