WAP in Chinese parameters

xiaoxiao2021-03-06  76

There are two cases: one is to set on the homepage to enable users to enter Chinese and accept it in the second page. The other is to pass the Chinese directly in the home page, and then accept it in the second page.

1. The first case: first.jsp

<% = waputil.Str2UTF ("Submit")%>

2. Second case:

String sendmsg = "Chinese"; > <% = Waputil.Str2UTF ("Send")%>

Receive page: string sendmsg = request.getParameter ("sendmsg"); if (sendmsg! = Null) sendmsg = java.net.urdecoder.decode (sendmsg); System.out.Println ("Sendmsg:" sendMSG);

Result: Sendmsg: Chinese

转载请注明原文地址:https://www.9cbs.com/read-120819.html

New Post(0)