关于s2sh中的首页问题

请问各位高手,在s2sh中,比如说我们访问http://localhost:8080/test/index.jsp首页。但首页上全是从数据库里读出来的数据,因此直接输入http://localhost:8080/test/index.jsp 肯定不会从数据库中读取。用什么办法可以使我在访问http://localhost:8080/test/index.jsp的时候,能够自动从数据库中将读出来(补充,index.jsp是用户直接在浏览器中输的,前面没得登陆等其它的一些网页)。。
[b]问题补充:[/b]
index是一个首页的嘛, 如何在浏览器中输入时转到 一个 action

这个要用到ajax的。

然后在一个脚本中写如下代码

var httpReq=false;

var url="这里写你要调用的action路径";

function init()

{

makeRequest(url);

}

function makeRequest(url)

{

if(window.XMLHttpRequest)// Mozilla, Safari,...

{

httpReq=new XMLHttpRequest();

}

else

{

if(window.ActiveXObject)//IE

{

try

{

httpReq=new ActiveXObject("Microsoft.XMLHTTP");

}

catch(e){}

}

}

if(httpReq)   
{   
    httpReq.onreadystatechange=tillRefresh;   
    httpReq.open("GET",url,true);//异步   
    httpReq.send(null);   
}   
else  
{   
    alert("不能创建一个XMLHTTPRequest实例");   
}   

}

function tillRefresh()

{

//var tempDiv=document.createElement("div");

// var userList=document.getElementById("userList");

if(httpReq.readyState==4)   
{   
    if(httpReq.status==200)   
    {   
        //tempDiv.innerHTML=httpReq.responseText;   

        //var required=tempDiv.getElementsByTagName("div");   
        //userList.innerHTML=required[0].innerHTML;   
        这里 把后台得到的相应输出到页面里
    }   
    else  
    {   
        alert("对不起,出现了一些问题 :"+httpReq.status);   
    }   
}   

}

至于后台的方法调用你去找找相关的ajax例子吧。比较简单。
待会我写一个ajax登录的例子,我把网页待会发过来

在你的index.jsp中直接跳转到一个读取数据的action,从这个action再到其它的结果页面

http://xiaoyu966.iteye.com/admin/blogs/379352
我刚写的一个demo,用到了ajax,看看吧,还是比较简单的

加这行在

中间,定时让网页在指定的时间n内,跳转到页面http://yourlink