Page Encoding in JSP

Viewed 21664

What's the best way to specify page encoding - using a page directive like this?

<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>

Or should I directly put it in a meta tag?

<head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /></head>

Eclipse by default uses both, so does that mean I need both?

3 Answers
Related