Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to call a javascript alert box from jsp page

 
narender sunkam
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello jspians,
I had an application where user enters login name and password
if user name and password exists he is directed to main page.
I had database variables username,password,amount,duration.
here for example user had duration of 15 minutes,then he is not allowed
to stay as a valid user for more than 15 minutes on any of the jsp pages, before making his session invalidate I want to display a alert box before
3 minutes saying the user had 3 minutes of duration left for completeing
of his session logout, so that he knows the amount of time left.
what I am doing is when the user logins I am keeping the system time in
session,and I am getting duration from database also keeping in session.
I am accessing these session variables in other jsp pages.Using while loop
before 3 minutes I am calling javascript alert box.
But my problem is I am getting after jsp page is completeing loading.
But I want jsp page first after that internally the jsp page should perform the loop and at the certain time it should display the alert box.

Please any one could give me some good idea about this I am in urgent of this as I need to submit my application very soon.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64629
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to read this article for a better understanding of how JSPs work, and why what you are trying to do is not the right way to do it.
[ March 11, 2006: Message edited by: Bear Bibeault ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic