我在這個一直盯着幾個小時,它必須是東西顯然是錯誤的,但我很茫然......碼頭上設置安全cookie 6 - > 8升級
在jetty6你曾經是能夠在這樣一個web應用程序設置安全Cookie(在WAR的相應$ JETTY_HOME /環境/ foo.xml上下文文件):
<Get name="sessionHandler">
<Get name="sessionManager">
<Set name="secureCookies">true</Set>
</Get>
</Get>
在碼頭8.1.8.v20121106它看起來像路徑是(代碼):
WebAppContext
.getSessionHandler()
.getSessionManager()
.getSessionCookieConfig()
.setSecure(true);
所以,好了...我這樣做,像這樣我的Web應用程序上下文XML配置:
<Configure class="org.eclipse.jetty.webapp.WebAppContext">
<Get name="sessionHandler">
<Get name="sessionManager">
<Get name="sessionCookieConfig">
<Set name="secure" type="boolean">true</Set>
</Get>
</Get>
</Get>
但碼頭未能想出這個錯誤:
2014-02-13 14:20:38.113:WARN:oejx.XmlConfiguration:Config error at true java.lang.NoSuchMethodException: class org.eclipse.jetty.server.session.AbstractSessionManager$2.setSecure(boolean) 2014-02-13 14:20:38.113:WARN:oejx.XmlConfiguration:Config error at true java.lang.NoSuchMethodException: class org.eclipse.jetty.server.session.AbstractSessionManager$2.setSecure(boolean) 2014-02-13 14:20:38.114:WARN:oejx.XmlConfiguration:Config error at true java.lang.NoSuchMethodException: class org.eclipse.jetty.server.session.AbstractSessionManager$2.setSecure(boolean) 2014-02-13 14:20:38.114:WARN:oejx.XmlConfiguration:Config error at true java.lang.NoSuchMethodException: class org.eclipse.jetty.server.session.AbstractSessionManager$2.setSecure(boolean) 2014-02-13 14:20:38.115:WARN:oejd.DeploymentManager:Unable to reach node goal: started java.lang.NoSuchMethodException: class org.eclipse.jetty.server.session.AbstractSessionManager$2.setSecure(boolean) at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.set(XmlConfiguration.java:586) at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.configure(XmlConfiguration.java:391) at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.get(XmlConfiguration.java:669) at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.configure(XmlConfiguration.java:397) at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.get(XmlConfiguration.java:669) at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.configure(XmlConfiguration.java:397) at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.get(XmlConfiguration.java:669) at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.configure(XmlConfiguration.java:397) at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.configure(XmlConfiguration.java:350) at org.eclipse.jetty.xml.XmlConfiguration.configure(XmlConfiguration.java:303)
任何人看到什麼顯然是錯的?