• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

how to call a javascript alert box from jsp page

 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Sheriff
Posts: 67747
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic