即论坛中的人气是如何做的?

解决方案 »

  1.   

    这是一段简单的计数代码,放在application.jsp中。
    <%
    int count = 0 ;
    String counter_name = request.getParameter("counter_name");
    try
    {
    count = Integer.parseInt((application.getAttribute(counter_name).toString()));
    }
    cathc()
    {
    }
    count++ ;
    application.setAttribute(counter_name,new Integer(counter));
    %>使用计数器。这在test.jsp页面中。
    <jsp:include page = "application.jsp">
    <jsp:param name = "counter_name" value = "test_application">
    </jsp:include>这样就OK了
      

  2.   

    http://community.csdn.net/Expert/topic/4983/4983305.xml?temp=.8822748
      

  3.   

    应该是在浏览页面中将浏览数+1,但还结合了session,即一个人不能反复地加1