Resin升级到3.1.3后,有同事发现原来在Resin 3.0.xx下成功运行的部分jsp文件(输出xml格式文件)编译出错:
1 2 3 4 5 6 7 | 500 Servlet Exception XXXXX.jsp:1: contentType 'text/xml; charset=UTF-8' conflicts with previous value of contentType 'text/html; charset=UTF-8'. Check the .jsp and any included .jsp files for conflicts. 1: <%@ page language="java" contentType="text/xml; charset=UTF-8" %> 2: <%@ page |
经反复测试,发现是文件格式问题。
解决方法:
用UltraEdit编辑JSP,另存为UTF-8 无 BOM格式
摘自:http://blog.youkuaiyun.com/herrapfel/article/details/5219743