次のJSFバッキングBeanメソッドがあり、条件に応じてリダイレクトを実行する必要があります。
public void navigationStatus() throws IOException {
log(LogMessages.getLogString(user, currentDatasource, nomeClasse, "navigationStatus", "navigationStatus"), null);
logger.debug("INSIDE navigationStatus ");
FacesContext context = FacesContext.getCurrentInstance();
HttpServletResponse response = (HttpServletResponse) context.getExternalContext().getResponse();
if (!isUserEnabled()) {
log(LogMessages.getLogString(user, currentDatasource, nomeClasse, "navigationStatus", "Sessione utente SCADUTA"), null);
logger.debug("Sessione utente SCADUTA");
response.sendRedirect("error.jsp");
}
}
ただし、これはすべてのページで機能するわけではありません。一部のページでは機能しますが、他のページでは機能しません。これはどのように発生し、どうすれば解決できますか?