只有在某些情況下,我已經這個錯誤調用和的XPage奇怪使用錯誤的XPages
java.lang.illegalArgumentException: Cookie name "some name" is a reserved token
可能是什麼原因?如何解決這個問題?
UPDATE
這裏面error-log-0.xml
<values>java.lang.IllegalArgumentException: Cookie name "Urbanistica e
Verde&count" is a reserved token
	at java.lang.Throwable.<init>
(Throwable.java:67)
	at javax.servlet.http.Cookie.<init>
(Cookie.java:128)
	at com.ibm.domino.xsp.bridge.http.servlet.XspCmdHttpServletRequest.parseCookieString (XspCmdHttpServletRequest.java:338)
	at com.ibm.domino.xsp.bridge.http.servlet.XspCmdHttpServletRequest.getCookies(XspCmdHttpServletRequest.java:269)
	at com.ibm.domino.xsp.bridge.http.servlet.XspCmdHttpServletRequest.readSessionId(XspCmdHttpServletRequest.java:171)
	at com.ibm.domino.xsp.bridge.http.servlet.XspCmdHttpServletRequest.<init>(XspCmdHttpServletRequest.java:142)
	at com.ibm.domino.xsp.bridge.http.engine.XspCmdManager.service(XspCmdManager.java:256)
</values>
更新2
XSP完整的錯誤行afterPageLoad
事件有這個SSJS
var cgi = new CGIVariables();
var exCon = facesContext.getExternalContext();
var response = exCon.getResponse();
response.setHeader("cache-control", "no-cache");
response.setDateHeader("Expires", -1);
com.xxx.MyClass.myMethod(
facesContext.getExternalContext().getRequest(),
response
);
facesContext.responseComplete();
CGIVariables
是一個服務器JavaScript函數(請參閱here),但實際上並未使用。 在myMethod
裏面MyClass
我不設置cookie。可能是CGIVariables
函數中的問題?
更新3 我做了一些關於交通網絡(與IE開發工具),請求的截圖。 這裏請求:
這裏關於請求的詳細信息:
這裏大約發送的cookie的細節(你可以看到,有與保留的名稱沒有餅乾,字符串Urbanistica e Verde
位於的值的其中一個cookie - >見紅線)
UPDATE 4
問題似乎涉及到the cookie value
,不the cookie name
。刪除','cookie值中的字符可解決問題
「某個名字」的價值是什麼?一些cookie名稱可能被保留。 –
error-log-0.xml出現此錯誤:「java.lang.IllegalArgumentException:Cookie名稱」Urbanistica e Verde&count「是保留的令牌」。我不知道爲什麼「&count」放入cookie名稱中...... –
問題不在於「&count」,問題在於名稱中的空格。看到下面的答案 – Greg