Note that there are some explanatory texts on larger screens.

plurals
  1. POSession lost when switching from https to http (tomcat 6.0.26)
    primarykey
    data
    text
    <p>i'm developping a web app (jsf 2.0 + facelets + richfaces 3.3.3 + oracle 10g + tomcat 6.0.26)</p> <p>in my app, there's is 1 path that is not secured, and the others are secured (web.xml):</p> <pre><code>&lt;login-config&gt; &lt;auth-method&gt;FORM&lt;/auth-method&gt; &lt;form-login-config&gt; &lt;form-login-page&gt;/faces/login.jsp&lt;/form-login-page&gt; &lt;form-error-page&gt;/faces/error.jsp&lt;/form-error-page&gt; &lt;/form-login-config&gt; &lt;/login-config&gt; &lt;security-constraint&gt; &lt;web-resource-collection&gt; &lt;web-resource-name&gt;Admin_Resource&lt;/web-resource-name&gt; &lt;description/&gt; &lt;url-pattern&gt;/faces/admin/*&lt;/url-pattern&gt; &lt;/web-resource-collection&gt; &lt;auth-constraint&gt; &lt;role-name&gt;A&lt;/role-name&gt; &lt;/auth-constraint&gt; &lt;user-data-constraint&gt; &lt;transport-guarantee&gt;CONFIDENTIAL&lt;/transport-guarantee&gt; &lt;/user-data-constraint&gt; &lt;/security-constraint&gt; &lt;security-role&gt; &lt;description&gt;Role admin&lt;/description&gt; &lt;role-name&gt;A&lt;/role-name&gt; &lt;/security-role&gt; </code></pre> <p>So, this path is not secured: /faces/client/*. when i move from https tp http, i use this function:</p> <pre><code>FacesContext.getCurrentInstance().getExternalContext().redirect("http://url/faces/client/page.xhtml"); </code></pre> <p>When i deploy my app, and use this url: http(s)://url/MyContext/faces/..., all worked fine. </p> <p>But when i moved my app to the ROOT context, so i use this url : http(s)://url/faces/, my https session is lost when i move from https to http, then back to https. My login page shows up, so i need to re-type my login and password.</p> <p>Why is my session lost ? Is there something wrong ?</p> <p><strong>Add:</strong> when i deploy my app, here's what i do (external server):</p> <ul> <li><p>put my war file into webapp folder</p></li> <li><p>start my server (that will decompress my war into folders,...), then stop it</p></li> <li><p>i delete my war file</p></li> <li><p>i replace the content of ROOT folder with the content of the decompressed war file</p></li> <li><p>and restart my server again</p></li> </ul> <p>but all works fine when i put my war into webapp folder, then start the server (that's all).</p> <p>So, i think it's a context problem.</p> <p>Do you have any ideas ?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload