我将cookie名称更改为自定义名称。此后,Wicket在页面首次加载时给出错误。 (发生意外错误(类型=未找到,状态= 404))。重新加载页面时,没有错误,因为cookie已经创建。
春季启动配置
server.session.cookie.name=mySessionId
答案 0 :(得分:1)
来自org.apache.wicket.util.string.Strings.java
:
/**
* The name of the parameter used to keep the session id.
* The Servlet specification mandates <em>jsessionid</em> but the web containers
* provide ways to set a custom one, e.g. <em>sid</em>.
* Since Wicket doesn't have access to the web container internals the name should be set explicitly.
*/
public static final String SESSION_ID_PARAM_NAME =
System.getProperty("wicket.jsessionid.name", "jsessionid");
尝试使用-Dwicket.jsessionid.name=mySessionId
启动Web容器,看看是否有帮助。