Skip to content

Commit

Permalink
move the redirect in js code
Browse files Browse the repository at this point in the history
git-svn-id: svn://svn.forge.objectweb.org/svnroot/spagobi/V_4.x/Server/trunk@22426 99afaf0d-6903-0410-885a-c66a8bbb5f81
  • Loading branch information
aghedin committed Mar 27, 2014
1 parent 84b7800 commit f216ec0
Showing 1 changed file with 19 additions and 7 deletions.
26 changes: 19 additions & 7 deletions SpagoBIProject/web-content/WEB-INF/jsp/wapp/logout.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ If a copy of the MPL was not distributed with this file, You can obtain one at h
boolean backUrlB=false;
String backUrl="";
String redirectUrl ="";
if(session.getAttribute(SpagoBIConstants.BACK_URL)!=null){
backUrl=(String)session.getAttribute(SpagoBIConstants.BACK_URL);
backUrlB=true;
Expand All @@ -89,24 +91,34 @@ if ((active == null || active.equalsIgnoreCase("false")) && !backUrlB) {
String context = request.getContextPath();
if (usePublicUser){
context += "/servlet/AdapterHTTP?PAGE=LoginPage&NEW_SESSION=TRUE";
response.sendRedirect(context);
redirectUrl = context;
}else{
response.sendRedirect(context);
redirectUrl = context;
}
}
else if (active != null && active.equalsIgnoreCase("true")) {
String urlLogout = SingletonConfig.getInstance().getConfigValue("SPAGOBI_SSO.SECURITY_LOGOUT_URL");
if(backUrlB==true){
response.sendRedirect(backUrl);
redirectUrl = backUrl;
}
response.sendRedirect(urlLogout);
redirectUrl = urlLogout;
} %>


<%if (active != null && active.equalsIgnoreCase("true")) { %>
<script>window.close();</script>
<% } %>
<script>
var myVar=setTimeout(function(){redirect()},1000);
function redirect()
{
function delayer(){
window.location = "../javascriptredirect.php"
}
}
</script>



0 comments on commit f216ec0

Please sign in to comment.