处理弹出窗口“Session Expired and Authentication Failed”
Tackling Session Expired and Authentication Failed in pop up window
当应用程序中的会话过期或单击某个按钮拒绝认证时,我们显示一条消息('会话过期'或'认证失败'),然后将用户带到登录页面。
问题是,当会话在某个屏幕上过期时,用户在会话过期后点击一个弹出链接,弹出窗口打开,然后弹出窗口显示登录页面。验证失败。
我需要的是,点击超链接,它应该直接去登录页面(我知道超链接没有击中服务器)
我们怎样才能避开这种情况呢?
我们正在使用一个基于Java的web应用程序
这是我们用来打开弹出窗口
的代码 window.open(url,"_blank","directories=no,
resize=no,scrollbars=yes,status=no,width=720, height=380,
top=250,left=250");
感谢您的帮助
使用脚本来控制它
// assuming that you have some kind of variable in the session which will get null if your session gets expired
<% if(session.getAttribute("uid")!=null){%>
window.open(url,"_blank","directories=no,
resize=no,scrollbars=yes,status=no,width=720, height=380,
top=250,left=250");
<%}else{%>
//wirte your redirect js
<%}%>
相关文章:
- Selenium WebDriver and JavaScript change
- PHP and Javascript functions
- Javascript Return and if/else
- SetTimeout and clearTimeout in Javascript
- lightbox in html 5 and javascript
- TimelineJS and AngularJS
- timeago.js with datatable and PHP
- javascript button ajax and php
- Ajax and Json with Rails
- Combine onload, onresize and onclick
- php布尔值's小写AND大写和数字布尔值'可以接受
- setTimeout and V8
- Jquery post and onclick
- Moment js and IOS
- Rails 3.2 and Paloma gem
- Backbone, TypeScript, and super
- iframe and JavaScript on different pages
- OAuth 2.0 and Phonegap's InAppBrowser for Authentication
- 处理弹出窗口“Session Expired and Authentication Failed”
- Authentication and authorization with Flatiron's Resourc