jsp中如何实现两个页面之间的相互跳转

jsp中怎么实现两个页面之间的相互跳转
两个jsp页面,怎么样实现打开A页面5秒钟后自动跳转到B页面,跳转时能实现倒计时。就跟在这里回帖时,回复成功后,他会自动阁几秒就返回到帖子页面。最好能够实现倒计时(比如页面显示5秒后自动跳转到B、4秒后自动跳转到B....这样的)。
求教高手解答....

------解决方案--------------------
HTML code

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
 <head>
  <title> new document </title>
  <meta name="generator" content="editplus" />
  <meta name="author" content="" />
  <meta name="keywords" content="" />
  <meta name="description" content="" />
 </head>

 <body>  
  <div id="t">t</div>
  <script type="text/javascript">
  <!--
    var i=5;
    function redirect(){        
        document.getElementById("t").innerHTML = (i +" 秒后跳转到 B");        
        if(i>0){
            window.setTimeout("redirect()",1000);
        }else{
            location.href = "b.jsp";
        }
        i--;
    }
    redirect();
  //-->
  </script>
 </body>
</html>

------解决方案--------------------
Response.AddHeader (“REFRESH”, ”5;URL=你的页面”)
或者<META>元素: 
<META HTTP-EQUIV=”REFRESH”, “5;URL=你的页面”>
------解决方案--------------------
****的自动跳转代码就可以。。

你输入你这个帖子的URL,只要把.html前面去掉几个字符就OK。
http://topic.****.net/u/20090702/23/8ce38971fecd.html 试试这个。


另外,我正在测试的一个网站也是这样搞的,http://www.360kanba.com


HTML code

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <script type="text/javascript">
    <!--
    var duration=2900;
    var endTime = new Date().getTime() + duration + 100;
    function interval()
    {
        var n=(endTime-new Date().getTime())/1000;
        if(n<0) return;
        document.getElementById("timeout").innerHTML = n.toFixed(3);
        setTimeout(interval, 10);
    }
    window.onload=function()
    {
        setTimeout("window.location.href='http://community.****.net/homepage.aspx'", duration);
        interval();
    }
    //-->
    </script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head><title>
    发生错误
</title></head>
<body>
    <form name="form1" method="post" action="err.aspx?404%3bhttp%3a%2f%2ftopic.****.net%3a80%2fu%2f20090702%2f23%2f1aa27cb7-4241-4c2e-b98d-8ce3s8971fecd.html" id="form1">
<div>
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUJNzgzNDMwNTMzZGTBJ75uFTxvajO9N2YxgXjDXYyDqg==" />
</div>

        <div>
            对不起!你所访问的页面出错!<br />
            系统在 <span id="timeout">3.000</span> 秒后 将自动跳转到 <a href="http://community.****.net/homepage.aspx">社区首页</a>
        </div>
    </form>
</body>
</html>

------解决方案--------------------
用JavaScript的setTimeout()函数
------解决方案--------------------
嗯,顶,学习了!
------解决方案--------------------
来学习下
UP