用WML+JSP做个手机网站,关于session问题
发布网友
发布时间:2022-04-22 08:23
我来回答
共1个回答
热心网友
时间:2022-04-22 09:53
我遇到的手机基本上都是经过session传值的,如果不支持的话你可以考虑用Servlet来传递参数,request.getRequestDispatcher().forward("ssss.wml");/**
Copyright 2008 cgMobile, Inc. All rights reserved.
Title: PhoneCode page of wap.5688.biz.
Author: Jason.Ma
Version: V1.0
Date: Sep-11-2008
*/
package cgm.com.page;
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import cgm.com.*;
public class PhoneCodePage extends HttpServlet
{
public void doPost(HttpServletRequest request,HttpServletResponse response) throws IOException,ServletException
{
String imsi = request.getParameter("imsi");
String imei = request.getParameter("imei");
if(null != imsi && null != imei)
{
request.getRequestDispatcher("phone.wml").forward(request,response);//传递参数imsi和imei到phone.wml(Servlet动态实现)
}
}
}
phone.wml页获取参数的方法就不用我说了吧,有问题详谈:majinshou@foxmail.com