• 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:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Liutauras Vilda
Sheriffs:
  • Paul Clapham
  • Jeanne Boyarsky
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
Bartenders:
  • Jesse Duncan
  • Frits Walraven
  • Mikalai Zaikin

Need Suggestion in page redirect after some time

 
Ranch Hand
Posts: 809
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am developing a module called forgot password where password is sent to the user entered email address. After user submits the forgotpassword page, password is sent to user email address by java mailing API.

In between I have a transition page with description that "we are sending your password to your email address. Please check your mail to get your password". Then user is redirected to login page.

Now I want some waiting time between the transition and login page. Login page should come up after the specified time. What would be the best way to do that?

One solution which comes in my mind is put current Thread in sleep state for some time.

Is this ok? Or should I go with JavaScript and call JavaScript inbuilt functions for the wait?

Warm Regards
Naseem Khan
 
Sheriff
Posts: 9109
12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are these html/jsp pages?
 
Naseem Khan
Ranch Hand
Posts: 809
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Marilyn de Queiroz:
Are these html/jsp pages?



Yeah. These are jsp/xhtml pages. I thought, java thread could be one approach to achieve this. Thats why I posted it here.

I googled it and I got another way of doing this. Well, this is Java intermediate forum and this approach is based on browser's redirect feature.

I set META tag in the html title tag.



Rgds,
Naseem
 
(instanceof Sidekick)
Posts: 8791
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Something like that, or a javascript function called on page load that sleeps a while and then sets the document location to the new page. I dimly recall there was some reason to avoid the refresh header ... given my memory it might have been an IE4 bug or something. Maybe ask over in the HTML forum which way they prefer.
reply
    Bookmark Topic Watch Topic
  • New Topic