I'm using Jboss 3.2, Tomcat 4.1 and Struts 1.1 (including Tiles) and am unable to set the encoding to utf-8. I've tried the following: 1) set the contenttype within the controller configuration in struts-config.xml contentType="text/html;charset=UTF-8" 2) set response header in Action class lResponse.setContentType("text/html; charset=UTF-8"); 3) set page directive within jsp (in the tile layout file) <%@ page contentType="text/html;charset=UTF-8" pageEncoding="utf-8" %> 4) set response header within jsp (in the tile layout file) <% response.setContentType("text/html;charset=UTF-8"); %>
Every time the encoding is iso-8859-1. The generated _jsp.java file contains the line response.setContentType("text/html;charset=ISO-8859-1"); and I've sniffed the request to confirm the headers. I can create a plain servlet and set the contenttype to utf-8 without any problems.
Any suggestions? Anyone get tiles to return utf-8? I shouldn't have to use a filter to fix this..
Try putting the page contenttype declaration as the first line in every tile. It has to be done before any output is sent to response.
Adam -- struts 1.1 + tomcat 5.0.16 + java 1.4.2 Linux 2.4.20 Debian
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]