已经解决了,大概是序列化的问题,但现在遇到了新问题。是关于Servlet的,
由于是第一次写Servlet,所以十分迷惑。
问题是这样的:
第一次请求正常,以后不论再发什么请求,都会出错:
Could not get URL http://211.100.71.160:8080/test_czm/servlet/mpservlet
HTTP Error : 500 (Internal Server Error)
<h1>Error: 500</h1><h2>Location: /test_czm/servlet/mpservlet</h2><b>Internal
Servlet Error:</b><br><pre>java.lang.IllegalArgumentException: Cookie name
Path is a reserved token at
javax.servlet.http.Cookie.<init>(Cookie.java:185) at
org.apache.tomcat.util.RequestUtil.processCookies(RequestUtil.java:187) at
org.apache.tomcat.core.RequestImpl.getCookies(RequestImpl.java:379) at
org.apache.tomcat.request.SessionInterceptor.requestMap(SessionInterceptor.j
ava:101) at
org.apache.tomcat.core.ContextManager.processRequest(ContextManager.java:594
) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:552)
at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:160) at
org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338
) at java.lang.Thread.run(Thread.java:484)</pre>
用到了Session,该Servelet的作用是输出一个页面到WAP手机,该页面上的链接再向
Servlet发下一个请求。Get方法。