2013-04-25 18 views
0

可能是這是一個重複的問題,但據我搜索上述問題是與Tomcat有關。和我試圖用於在web.xml中設置http-only標誌的那些方法中的很少一部分不能與sun one webserver一起使用。因此,請向我建議如何將http-only添加到在sun one webserver上運行的Web應用程序的JSESSIONID。如何設置jsession id與太陽一個網絡服務器上的http -only標誌

感謝

+0

我用在web.xml中設置標誌 – user2026311 2013-04-25 09:54:39

+0

我使用太陽的網絡服務器6 – user2026311 2013-04-25 10:04:25

+0

你看到下面的答案嗎?它有幫助嗎? – Michael 2013-05-23 13:59:22

回答

0

的配置與web應用程序的版本,並沒有涉及到Tomcat或網絡服務器的6.0。下面 的配置是可能的,僅僅在版本=「3.0」:

<web-app xmlns="http://java.sun.com/xml/ns/javaee" 
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
     xsi:schemaLocation="http://java.sun.com/xml/ns/javaee web-app_3_0.xsd" 
     version="3.0"> 

     <!-- The configuration below is possible only in the version="3.0" --> 
     <session-config> 
     <cookie-config> 
      <http-only>true</http-only> 
     </cookie-config> 
     </session-config> 

</web-app> 
相關問題