This week's book giveaway is in the Cloud/Virtualizaton forum.
We're giving away four copies of Mesos in Action and have Roger Ignazio on-line!
See this thread for details.
Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

response.sendRedirect with time delay

 
Annemarie McKeown
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using response.sendRedirect(url) to direct a user another url after they have input some info in a form and clicked submit.
So on the process page of the form, I want to display something like the following before the user is redircetd to another page:
"Thanks for your details...we are taking you back to....."
With my code, the user is simply redirected to the (url) in question when they click on the submit button, and doesn't seen the text I want to display.

Note: Ive just realised it would be something like JavaRanch forums, after you submit a new post, the user is displayed: Sit tight we are taking you back to url; before the user is directed to that url.
Do you know how I would implement this?
[ March 31, 2004: Message edited by: Annemarie McKeown ]
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JavaScript
goes to next page in 5 seconds
setTimeout("document.location.href='newPage.jsp'",5000);

Eric
 
damien malone
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
alternatively you can try this
<html>
<head>
<META
http-equiv="refresh" content="5;URL=http://www.javaranch.com">
</head>
<body bgcolor="#ffffff">
<center>You will be redirected to javaranch automatically in 5 seconds.
</center>
</body>
</html>
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic