jspページから切断したいのですが、そのために私が試したのは次のとおりです。
私のJSP(accueil_mobile.jsp)で私はこれを得ました:
<form action="b" method="POST">
<input type="submit" value="Deconnexion" />
</form>
b は、post のメソッドが次のような SERVLET を指します。
public static final String VUE = "/accueil_mobile.jsp" ;
.
.
.
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
request.getSession().invalidate();
response.sendRedirect("accueil.xhtml");
this.getServletContext().getRequestDispatcher(VUE).forward(request, response) ;
}
これでセッションが無効になり、にリダイレクトされると思ってaccueil.xhtml
いましたが、ページを無期限にロードするだけです。何故ですか ?
ありがとう。