• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Unable to move to invalid login page from within the home page

 
Rahul Bhat
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am working on Servlets and JSPs. To start with, I have a home page wherein I have used an iframe. In the iframe I perform all the operations such display of data, editing the details etc. So when the session gets invalid it should take me to the invalid login page outside the iframe. But as per my code the invalid login page is displayed within iframe itself. This is what i have in my servlet code when the session is invalid:-

rd = request.getRequestDispatcher("/invalidlogin.jsp");

All the pages are in one directory.

Any help on this will be appreciable.

Thanks
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65216
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You will not be able to break out of the iframe without client-side assist. A response will always be delivered to the window/frame in which the request was made.

You'll need to return some JavaScript code that will cause a redirect for the main window to the login page.
 
Rahul Bhat
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey,

Thanks for the reply..

Can you give me an example of how it can be done?
 
Rahul Bhat
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please suggest me some solution for this.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic