当重定向302时,Cookie显示在地址栏中

时间:2013-10-04 10:09:07

标签: jsf session cookies weblogic

我想知道为什么第一次访问我的应用程序时cookie会显示在地址栏中?出于安全原因,我想隐藏地址栏中的cookie。

正如您在访问应用程序时从以下文件中看到的那样,首先调用index.html,然后重定向到home.xhtml,因为您还没有会话您被重定向到login.jsp。并非总是如此,但有时您可以在地址栏中看到cookie。

  

https://X.X.X.X:7111/app/faces/jsp/login.jsp;COOKIE_APP=dNVrSTPhjW8ThySgwtqKJZSfT318zXNWt00P3K1wNBhy3TWmnP5Q!1315530522

  • 问题1:为什么有时显示的cookie是地址栏,有时候不是?
  • 问题2:如何摆脱地址栏中的cookie? (确实是POST,但是怎么样?)

的index.html

<html>
<head>
    <meta http-equiv="refresh" content="1;url=faces/content/home.xhtml">
</head>

<body bgcolor="white">
</body>
</html>

的web.xml

<login-config>
    <auth-method>FORM</auth-method>
    <form-login-config>
        <form-login-page>/faces/jsp/login.jsp</form-login-page>
        <form-error-page>/faces/jsp/loginretry.jsp</form-error-page>
    </form-login-config>
</login-config>

0 个答案:

没有答案