IllegalArgumentException Is Thrown When Creating a Cookie (Doc ID 1663719.1)

Last updated on NOVEMBER 05, 2016

Applies to:

Oracle WebLogic Server - Version 12.1.2.0.0 and later
Information in this document applies to any platform.

Symptoms

A Web application is deployed into WebLogic Server 12.1.2.
When creating a javax.servlet.http.Cookie with name "prt:Prof", the IllegalArgumentException exception as the following :

java.lang.IllegalArgumentException: Cookie name "prt:Prof" is a reserved token
at javax.servlet.http.Cookie.<init>(Cookie.java:189)
at com.xx.bb.cc.servlet.ExternalAppServlet.stagingUserLoginCookie(ExternalAppServlet.java:63)
at com.xx.bb.cc.servlet.ExternalAppServlet.process(ExternalAppServlet.java:47)
at com.xx.bb.cc.servlet.AbstractServlet.doGet(AbstractServlet.java:34)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:844)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:280)

This exception does not occur against WebLogic Server 10.3.6 version.

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms