在页面上显示action中值栈中的数据是重复的

我在控制台中输出list集合中的数据是正确的,但是在网页上显示是不一致的,请问是什么地方出了问题??图片说明图片说明图片说明

action中的代码:

public String list(){
        List<Department> list = departmentService.selAll();
        getValueStack().set("list", list);
        System.out.println(list);
        // 跳转到列表页面显示
        return "list";
    }

jsp页面中的主要代码:

<s:iterator value="list" >
                <tr class="TableDetail1 template">
                    <td>
                        <s:a action="department_list?parentId=%{id}" namespace="/">
                        ${name}
                        </s:a>&nbsp;</td>
                    <td>${parent.name}&nbsp;</td>
                    <td>${description}&nbsp;</td>
                    <td><s:a onclick="return window.confirm('这将删除所有的下级部门,您确定要删除吗?')" action="department_delete?id=%{id}" namespace="/">删除</s:a>
                        <s:a action="department_editUI?id=%{id}" namespace="/">修改</s:a>
                    </td>
                </tr>
                <script type="text/javascript">
                  alert("一个记录");
                  </script>
            </s:iterator>

在struts配置action:

<action name="department_*" class="departmentAction" method="{1}">
            <result name="list">/WEB-INF/jsp/department/list.jsp</result>
        </action>

把页面中获得的动态迭代地方去掉换成静态的字母代替发现静态的记录有四条但是页面上没有添加四条记录的代码,最后发现该页面引入了一个demo的js,让页面本身就有了4条记录,所以把js的引入去掉即可