JSP page garbled Problem _ compatible

Source: Internet
Author: User

These two days in the development process encountered a strange problem: the same Web application, the same JSP in different operating systems to be handled through different processing to solve the garbled problem.

The default encoding for JSP pages is UTF-8. When the contents of the textarea are submitted to this page, but in the win operating system, the direct extraction of the standard data can be, such as Request.getparameter ("textarea"), but in the Linux operating system, the extraction of data, You can use character set conversion to correctly output, such as New String (Request.getparameter ("textarea"). GetBytes ("Iso-8859-1"), "UTF-8", or the default character set for different operating systems.

Related Article

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.