Create WAP applications using JSP/ASP
Author:Eve Cole
Update Time:2009-07-02 17:13:05
Create WAP applications using JSP/ASP
(BY:DarkMan)
It is very easy to create dynamic WML content using ASP or JSP. The only thing to note is to configure the server so that its script output type is "text/vnd.wap.wml", or set the output type directly in the script.
The following is an example of using JSP to output dynamic WML content:
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.wapforum.org/DTD/wml_1.1.xml">
<% response.setContentType("text/vnd.wap.wml"); %>
<wml>
<card id="start">
<do type="accept">
<go href="index.jsp#test"/>
</do>
<p>Use JSP to output dynamic WML:<br/>
Select Accept to continue!<br/>
</p>
</card>
<card id="test">
<do type="prev">
<prev/>
</do>
<%
out.println("<p>");
out.println("Hello, test successful!<br/>");
out.println("</p>");
%>
</card>
</wml>