用jsp写wml动态网页!出现问题!高手请进!!
我用jsp写了一个wml的程序,我的服务器配置是apache+tomcat, 出现的问题是:当我浏览网页的时候,就会跳出下载保存的窗口,不能正常看到网页内容!不知道这是什么原因???请指教高手!!
如下:
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.wapforum.org/DTD/wml_1.1.xml">
<%@ page contentType="text/vnd.wap.wml;charset=ISO-8859-1" %>
<%@ page import="java.util.Date" %> <!-- directives -->
<%! int i=5,j=2; %> <!-- a declaration -->
<%! String s=" Wireless World!"; %> <!-- a declaration -->
<wml>
<card id="start">
<p align="center" >
<big><strong>
<br/>Hello <%= s %>
<br/>It's <%= new java.util.Date() %>
<br/> trial <%= ++i %>
</strong></big>
</p>
<do type="accept" label="Go!">
<go href="http://www.wapforum.com" />
</do>
<do type="accept" label="help" >
<go href="#help" />
</do>
</card>
<card id="help">
<p align="center">
<% if(i<=12){ %> <!-- code fragment; -->
<big>How can I help you?</big> <!-- template appears if i<= 12 -->
<% }else { %> <!-- else clause -->
<small> More than a dozen </small> <!-- template for i > 12 -->
<% } %>
</p>
</card>
</wml>
程序本身我想应该没什么问题,这是书上的程序!