Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Redirect page to avoid flashing

 
Raj Puri
Ranch Hand
Posts: 189
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have an application that has complex HTML/JSP code. The onload event does series of things and checks user is valid or not. I try to redirect the invalid user to error page. But, I see page flashing, is there a way I can put the user check code in a seperate page and redirect page there and then load this page if success. I a do number of things in onload and seems
the process is really not the way code is typed. I was looking at using to solve this problem by using any inherent met-tags that can redirect to a
dummy page that checks users and if pass loads the current page. Any hint?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65118
89
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why are you checking the user validity on the client in a Javascript handler? This is much better suited to a server-side check before the page even gets sent to the browser. A servlet Filter works great for such things.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic