配置weblogic.xml以发送安全的JSESSIONID

时间:2014-03-26 13:36:51

标签: java xml weblogic jsessionid

我尝试添加到weblogic.xml文件<cookie-secure>标记:

<wls:session-descriptor>
    <wls:timeout-secs>1800</wls:timeout-secs>
    <wls:cookie-path>/my-web</wls:cookie-path>
    <wls:cookie-http-only>false</wls:cookie-http-only>
    <wls:url-rewriting-enabled>false</wls:url-rewriting-enabled>
    <wls:sharing-enabled>true</wls:sharing-enabled>
    <wls:invalidate-on-relogin>true</wls:invalidate-on-relogin>
    <wls:cookie-secure>true</wls:cookie-secure>
</wls:session-descriptor>

但是出现错误:

cvc-complex-type.2.4.d: Invalid content was found starting with element 'wls:cookie-secure'. No child element is expected at this point

如何解决问题?

1 个答案:

答案 0 :(得分:2)

正确的顺序是:

<wls:timeout-secs>1800</wls:timeout-secs>
<wls:cookie-path>/my</wls:cookie-path>
<wls:cookie-secure>true</wls:cookie-secure>
<wls:cookie-http-only>true</wls:cookie-http-only>
<wls:url-rewriting-enabled>false</wls:url-rewriting-enabled>