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?
You don’t need both. Actually,
<%@ page pageEncoding="utf-8" %>suffices.