Contenttype 'text/XML; charset = UTF-8 'conflicts Problems

Source: Internet
Author: User

After resin was upgraded to 3.1.3, some colleagues found that some JSP files (output XML format files) that were successfully run under resin 3.0.xx failed to compile:

1
2
3
4
5
6
7
500 Servlet exceptionxxxxx. JSP: 1: contenttype 'text/XML; charset = UTF-8 'conflicts with previous value of contenttype' text/html; charset = UTF-8 '. check. JSP and any encoded ded. JSP filesForConflicts. 1: <% @ page Language = "Java" contenttype = "text/XML; charset = UTF-8" %> 2: <% @ page



After repeated tests, it was found that the file format was incorrect.

Solution:

Solution:

Use ultraedit to edit JSP and save itUTF-8NoneBOMFormatNo error is reported, but garbled,If it is saved as ANSI/ASCII, there will be no garbled characters and no error will be reported..

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.