Mantis - Resin
Viewing Issue Advanced Details
3062 minor always 11-10-08 18:37 03-25-09 16:54
CnXiaowei  
ferg  
normal  
closed 3.1.7  
fixed  
none    
none 4.0.0  
0003062: UTF-8 jsp files return 'contentType xxx conflicts with previous value of contentType yyy'
I use resin-3.1.7a as my application server,and most of my jsp files is starts with<%@ page contentType="text/vnd.wap.wml;charset=UTF-8"%>&65292;It works well in resin-3.0.14&65292;but when I moved the application to resin-3.1.7,It doesn;t work,the error is:

[show] /index.jsp:1: contentType 'text/vnd.wap.wml; 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 contentType="text/vnd.wap.wml; charset=utf-8"%>
2: <%@page import="java.util.*"%>
3: <%!

I have read the source code of JspParser.java,and found that when the jsp file is UTF-8 format(with BOM,starts with 0xef,0xbb,0xbf),resin will set the content type as 'text/html; charset=UTF-8',But the content type I want to set is text/vnd.wap.wml; charset=utf-8'
 D:\resin-3.1.7a\webapps\ROOT\test.jsp [^] (447 bytes) 11-11-08 18:02

Notes
(0003540)
ferg   
11-11-08 09:34   
Do you have another setting for the contentType? For example a &lt;prelude> file or any includes?

Resin 3.1 is more strict as required by the JSP TCK. We need to return that error message to be compliant.
(0003542)
CnXiaowei   
11-11-08 18:06   
I have put the file to a resin-3.1.3
The url is http://116.213.64.53/m/test.jsp [^]
And the file is same as the attached file I have uploaded.
(0003932)
ferg   
03-25-09 16:54   
jsp/002a