I get this exception accessing a servlet in the Epoc32 emulator browser:
HANDLER THREAD PROBLEM: java.lang.IllegalArgumentException: Cookie name
Discard is a reserved token
java.lang.IllegalArgumentException: Cookie name Discard is a reserved token
at javax.servlet.http.Cookie.<init>(Cookie.java:145)
at
com.sun.web.server.ServerRequest.processCookies(ServerRequest.java:154)
at
com.sun.web.server.ServerRequest.readNextRequest(ServerRequest.java:69)
at
com.sun.web.server.ConnectionHandler.run(ConnectionHandler.java:68)
I read the source code of Cookie.java and realized that this exception is
thrown when a cookie with name "Discard" is to be instantiated, (I mean
Cookie myCookie = new Cookie("Discard",...) )
I use JSDK Webserver Version 2.1.
In Tools/General Preferences/Other/Use cookies is set "Always"
My servlet creates a new session, so a new cookie should be created:
HttpSession oHttpSession = request.getSession(false);
if (oHttpSession!=null)
oHttpSession.invalidate();
oHttpSession = request.getSession(true);
Why this exception is being thrown? I have heard that the Web server that
comes with Epoc32 emulator doesn't support cookies, but in "Tools/General
Preferences/Other/Use cookies" you can set to allow or not cookies
Any help?
--------------
Oscar Guindzberg
[EMAIL PROTECTED]
++54-11-4345-0537 (int. 132)
Java Development Team
Soluciones Integrales S.A.
Buenos Aires - Argentina
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html