Notes for wap development in jsp

Source: Internet
Author: User

The reference code is as follows:

<? Xml version = "1.0" encoding = "UTF-8"?>

<% @ Page contentType = "text/vnd. wap. wml; charset = UTF-8" %>
<% @ Include file = "/common/taglibs. jsp" %>
<! DOCTYPE wml PUBLIC "-// WAPFORUM // dtd wml 1.1 //" http://www.wapforum.org/DTD/wml_1.1.xml ">
<Wml>
<Head>
<Meta http-equiv = "Cache-Control" content = "max-age = 0"/>
<Meta http-equiv = "Cache-Control" content = "no-cache"/>
</Head>
<Card id = "login" title = "User login">
<P >$ {errTip} </p>
<P> mobile phone number: <br/> <input type = "text" id = "j_username" name = "j_username"/> </p>
<P> password: <br/> <input type = "password" id = "j_password" name = "j_password"/> </p>
<P> <anchor title = "click to log on"> log on
<Go href = "wap-login! CheckLogin. jspx "method =" post "accept-charset =" UTF-8 ">
<Postfield name = "username" value = "$ (j_username)"/>
<Postfield name = "password" value = "$ (j_password)"/>
</Go>
</Anchor> </p>

<P> <anchor title = "click this link for computer access"> click this link for computer access to this page.
<Go href = "$ {ctx}/login. jspx? Type = 1 "method =" post "accept-charset =" UTF-8 ">
</Go>
</Anchor> </p>
</Card>
</Wml>

Note:

All mobile phones must be accessible normally.

1. Do not add html tags.

2. Do not add the title attribute to the head.

3. The <anchor> label must be added <p>. If some mobile phones are not added, an error will be resolved.

4. <? Xml version = "1.0" encoding = "UTF-8"?> It is better not to have spaces before

5. <% @ page contentType = "text/vnd. wap. wml; charset = UTF-8" %> there is a space before page

6. The & nbsp; uc browser does not parse

You can use the operabrowser to access wap. Right-click the source code to view the wap page format.

 


From youth and letters

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.