Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

farsi in jsp?

  Asked By: Leona    Date: Jun 24    Category: Java    Views: 1022
  

Would you please somebody guide me how I can write farsi in JSP page?
First of all I should say that I write jsp in intellijIdea and I use
TomCat for browsing the page and also I had added this script on top
of my page

<?xml version="1.0" encoding="utf-8"?>
<%@ page contentType="text/html; utf-8"%>
but it wasn't successful.

Share: 

 

2 Answers Found

 
Answer #1    Answered By: Jonah Brown     Answered On: Jun 24

try


<?xml version="1.0" encoding="utf-8"?>
<%@ page  contentType="text/html;"%>
<% response.setContentType("text/html;"); %>
<Head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

I hope it works well.

 
Answer #2    Answered By: Boyce Fischer     Answered On: Jun 24

you must insert blow line top off your jsp  files:


<%@ page  contentType="text/html; charset=utf-8" %>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Language" content="fa">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
</html>

 
Didn't find what you were looking for? Find more on farsi in jsp? Or get search suggestion and latest updates.




Tagged: