javaweb前台展示有关问题

javaweb前台展示问题
    本人菜鸟一枚,想请教一下各位大神。javaweb一般前台页面展示信息,采用的是什么方法。传统的SSH存储LIST展示,ajax获取,还是其他什么方法?
------解决思路----------------------

怎么还有用struts2 标签进行页面展示数据的呢,下面给个列子struts 搭配 json ajax。代替struts2标签。实现数据内容局部刷新。



<script type="text/javascript">
var currentPage=1; //当前第1页
 var pageSize = 7; //每页7条数据
$(document).ready(function(){
   getNewsData();
})
function getNewsData(){
$.ajax({
url:'listInfoAjax.action',  //进入页面执行listInfoAjax action
data:'currentPage='+currentPage,    //参数 当前页,默认为1
type:'post',                        
dataType:'json',                   //使用接送格式。
// json格式的struts配置为
             //<package name="...." extends="json-default" >

// <action name="..." class="..." method="..." >
<result  type="json"></result>
// </action>
           //</package>
success:function(data){   //回调函数,如果后台方法没有抛异常,执行下面的语句块。
                              // totalCount ,pageSize,infos,后台方法里变量
totalCount=data.totalCount; //总记录数
totalPage=data.pageSize; //总页数
var inf=data.infos; //集合
$("#deleteall").empty();  //清空页面数据源
var html="";   即将要插入的数据
$.each(inf,function(i,news){   //相当于for循环
                                 
                                  //需要展示的内容,如id,title,date
var id=news.id;    
var title=news.title;
var date=news.date;
html+="<tr><td><input type='checkbox' style='background: #f4f4f4;border: 0px;' value='"+id+"'></td> <td>"+date+"</td><td>"+title+"</td> </tr>"   //插入的数据
})
$(html).appendTo("#deleteall");    数据插入到deleteall里面
$("#crt").empty();    //清空当前页字符串
$("#crt").append(currentPage); //改变当前页字符串
$(".fenye1").unbind(); // 给上一页,下一页,解除bind
$("#deleteall tr").css("background","#e5e5e5"); //给数据添加样式
$("#deleteall tr").mouseover(function(){
$(this).css("background","#FFFFCC").siblings().css("background","#e5e5e5");//同上
})

//改变上一页,下一页,样式。以及传入的样式。
if(totalPage!=1){
if(currentPage==1){
$("#pre").replaceWith("<b style='font-weight:normal;color:#eeeeee;' id='syy'>上一页</b>");
   $("#next").click(function(){
   changeCurrentPage($(this).attr("id"));
   });
   }else if(currentPage==totalPage){
   $("#next").replaceWith("<b style='font-weight:normal;color:#eeeeee;' id='xyy'>下一页</b>");
   $("#pre").click(function(){
   changeCurrentPage($(this).attr("id"));
   });
   }else{
   $("#syy").replaceWith("<a id='pre'  class='fenye1' href='#'>上一页</a>");
   $("#xyy").replaceWith("<a id='next'  class='fenye1' href='#'>下一页</a>");
   $(".fenye1").click(function(){
   changeCurrentPage($(this).attr("id"));
   });
   }
}
}

});
}
function changeCurrentPage(id){
   if(id=="pre") currentPage -= 1;
   else if(id=="next") currentPage += 1;
   else currentPage = id;
   getNewsData();
   }
</script>