Pass Chinese parameters between Flex and Jsp

Source: Internet
Author: User

I have been talking about the Chinese issue of Flex, but many people still make mistakes in this regard, including kenshin, which has also taken some detours, so now let's take a look at the question of Flex's Chinese parameters. Thank you. If you have written something wrong, please forgive me.

In fact, the solution to the Chinese problem is nothing more than encoding consistency. For example, if two people communicate, their language must be consistent, in this way, both parties can understand what the other party has said. This is a common sense in real life. in programming, the truth is the same. To make Flex and JSP both "say the same thing ", first, we need to make their encoding, that is, "language", consistent. This is the root cause. The first thing we need to do is to display the encoding settings of the two languages.

We all know that the Flex encoding method is in the UTF-8 format. This sentence is clear.

You can also set the encoding format in JSP.

After the above writing, the characters and encoding of these two languages are consistent, that is, they are in the UTF-8 format, so that the two languages can establish "communication ".

In general, we have done the most important step. There are two cases of Flex Chinese transfer:

Flex and JSP, based on the above, add request in JSP. getParameter ("AAA "). getBytes ("ISO8859-1"), "UTF-8") so that the parameters passed in from Flex can maintain the Chinese character state in JSP.

Flex and JSP are also based on the above. As long as both sides are encoded in UTF-8 format, the results in Flex can be Chinese characters.

  1. JSP bean code optimization
  2. Detailed introduction to JSP environment configuration Scheme
  3. Use stored procedures in JSP JSTL
  4. Which of ASP. NET, JSP, and PHP is better?
  5. JSP-related software

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.