not work in kannel, but can works in WinWAP Browser 3.1 and Nokia WAP Gateway Simulator.
here is log:
2004-08-27 15:34:38 [5566] [0] INFO: Connected to bearerbox at localhost port 13 002.
2004-08-27 15:35:41 [5566] [6] INFO: Fetching <http://192.168.1.100:8080/wap/login.jsp>
2004-08-27 15:35:41 [5566] [7] INFO: WBXML: No wbxml version given, assuming 1.1
2004-08-27 15:36:02 [5566] [6] INFO: Fetching <http://192.168.1.100:8080/wap/login.jsp>
2004-08-27 15:36:02 [5566] [7] ERROR: WML compiler: Compiling error: libxml retu rned a NULL pointer
2004-08-27 15:36:02 [5566] [7] WARNING: WSP: WML compilation failed.
2004-08-27 15:36:02 [5566] [7] WARNING: WSP: All converters for `text/vnd.wap.wml' at
`http://192.168.1.100:8080/wap/login.jsp' failed.
2004-08-27 15:36:02 [5566] [6] INFO: Fetching <http://192.168.1.100:8080/wap/allMenu.jsp?userId=999999&passWd=999999&devId=2>
Entity: line 1: parser error : Input is not proper UTF-8, indicate encoding !
<[EMAIL PROTECTED]
[EMAIL PROTECTED]>
^
Entity: line 1: error: Bytes: 0xBB 0xF1 0xC8 0xA1
<[EMAIL PROTECTED]
[EMAIL PROTECTED]>
^
Entity: line 2: parser error : XML declaration allowed only at the start of the document
<?xml version="1.0" ?>
^
Entity: line 21: parser error : EntityRef: expecting ';'
<a href="http://192.168.1.100:8080/wap/renYuan.jsp?userId=999999&passWd
^
Entity: line 21: parser error : EntityRef: expecting ';'
ref="http://192.168.1.100:8080/wap/renYuan.jsp?userId=999999&passWd=999999&devId
^
Entity: line 24: parser error : EntityRef: expecting ';'
<a href="http://192.168.1.100:8080/wap/wuPin.jsp?userId=999999&passWd
^
Entity: line 24: parser error : EntityRef: expecting ';'
href="http://192.168.1.100:8080/wap/wuPin.jsp?userId=999999&passWd=999999&devId
^
Entity: line 36: parser error : EntityRef: expecting ';'
<a href="http://192.168.1.100:8080/wap/tongJiInput.jsp?userId=999999&passWd
^
Entity: line 36: parser error : EntityRef: expecting ';'
"http://192.168.1.100:8080/wap/tongJiInput.jsp?userId=999999&passWd=999999&devId
^
Entity: line 39: parser error : EntityRef: expecting ';'
<a href="http://192.168.1.100:8080/wap/System.jsp?userId=999999& passWd=
^
Entity: line 39: parser error : EntityRef: expecting ';'
href="http://192.168.1.100:8080/wap/System.jsp?userId=999999&passWd=999999&devId
^
2004-08-27 15:36:06 [5566] [7] ERROR: WML compiler: Compiling error: libxml retu rned a NULL pointer
2004-08-27 15:36:06 [5566] [7] WARNING: WSP: WML compilation failed.
2004-08-27 15:36:06 [5566] [7] WARNING: WSP: All converters for `text/vnd.wap.wm l' at
`http://192.168.1.100:8080/wap/allMenu.jsp?userId=999999&passWd=999999&dev Id=2' failed.
here is login.jsp:
<%@ page contentType="text/vnd.wap.wml;" %>
<%@ page import = "wap.util.*" %>
<%
System.out.println("mhb0827");
String infoTip = ""; // 提示信息 remind infomation
UserInfo userInfo = new UserInfo(request);
int isLogOn = userInfo.isLogOn();//判断用户名和密码是否正确 //judge user and key if(isLogOn == 1)
response.sendRedirect(response.encodeRedirectURL("allMenu.jsp?" + userInfo.getOutput()));
else if(isLogOn == -1)
infoTip = Native2UnicodeForWAP2.convert("您没有使用系统权限!"); //this is chinese char else if(isLogOn == -2)
infoTip = Native2UnicodeForWAP2.convert("用户名或密码不正确!"); //this is chinese char
else
infoTip = Native2UnicodeForWAP2.convert("输入用户名和密码"); //this is chinese char
%>
<%= Util.getWapDocPrologue() %>
<wml>
<card id = "form" title="<%= Native2UnicodeForWAP2.convert("欢迎使用")%>"> //this is chinese char <p align="center">
<%= infoTip%><br/>
<fieldset>
<%= Native2UnicodeForWAP2.convert("用户名")%>:<input name="userIdInput" format="*M" maxlength="10"/><br/>
<%= Native2UnicodeForWAP2.convert("密码")%>:<input type="password" name="pwd" format="*N" maxlength="10"/>
</fieldset>
<do type="submit" label="<%= Native2UnicodeForWAP2.convert("登录
")%>">
<go href="<%= Util.getAppServerPath(request)%>/wap/login.jsp" method="post">
<postfield name="userId" value="$(userIdInput)"/>
<postfield name="passWd" value="$(pwd)"/>
<postfield name="devId" value="2"/>
</go>
</do>
</p>
</card>
</wml>
here is allMenu.jsp:
<%@ page contentType="text/vnd.wap.wml;"%>
<%@ page import="java.util.*, java.net.*, wap.util.*, com.sun.corba.se.internal.core.Response" %>
<%
UserInfo userInfo = new UserInfo(request);
int isLogOn = userInfo.isLogOn();
if (isLogOn != 1)
response.sendRedirect("login.jsp");
%>
<!--获取Wap文档序言--> //this is chinese char
<%= Util.getWapDocPrologue() %>
<wml>
<head>
<meta http-equiv="Cache_Control" content="max-age=0"/>
</head>
<card id="menu" title="<%= Native2UnicodeForWAP2.convert("系统菜单")%>">
<p align="center">
<a href="<%= Util.getAppServerPath(request)%>/wap/renYuan.jsp?<%=userInfo.getOutput() %>"><%= Native2UnicodeForWAP2.convert("人员查询")%></a><br/> <a href="<%= Util.getAppServerPath(request)%>/wap/wuPin.jsp?<%= userInfo.getOutput() %>"><%= Native2UnicodeForWAP2.convert("物品查询
")%></a><br/>
<a href="<%= Util.getAppServerPath(request)%>/wap/building.jsp"><%= Native2UnicodeForWAP2.convert("地点查询")%></a><br/>
<a href="<%= Util.getAppServerPath(request)%>/wap/building.jsp"><%= Native2UnicodeForWAP2.convert("事件查询")%></a><br/> <a href="<%= Util.getAppServerPath(request)%>/wap/building.jsp"><%= Native2UnicodeForWAP2.convert("法规查询")%></a><br/> <a href="<%= Util.getAppServerPath(request)%>/wap/tongJiInput.jsp?<%= userInfo.getOutput() %>"><%= Native2UnicodeForWAP2.convert("查询统计") %></a><br/> <a href="<%= Util.getAppServerPath(request)%>/wap/System.jsp?<%= userInfo.getOutput() %>"><%= Native2UnicodeForWAP2.convert("系统维护") %></a><br/>
<a href="<%= Util.getAppServerPath(request)%>/wap/login.jsp"><%= Native2UnicodeForWAP2.convert("退出") %></a>
</p> </card> </wml>
Regards, filejy
_________________________________________________________________
享用世界上最大的电子邮件系统― MSN Hotmail。 http://www.hotmail.com
