Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Non-Western European Language

Kalicharan Dendage
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,
i am trying to display 'Japanese text' thru my servlet code... but it does not display and result in IE. when run in Netscape 6.0 it give "500 Internal Server Error
HelloJapan: Shift-JIS "
i am attaching the code also... can anybody help me ???
Start of Code**************
import java.text.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class HelloJapan extends HttpServlet {
public void doGet(HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException {
res.setContentType("text/html; charset=Shift-JIS");
PrintWriter out = res.getWriter();
Locale locale = new Locale("ja","");
DateFormat full = DateFormat.getDateTimeInstance(DateFormat.LONG,DateFormat.LONG,locale);
out.println("In Japanese ");
out.println(full.format(new Date()));
} //doGet
}// HelloJapan
End of Code**************

Inside of every large program is a small program struggling to get out.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic