eg.
List userList = service.findUsersForList(param);
if(userList == null || userList.size() <= 0){
    throw new TestProjectWebException("没有找到符合条件的记录");
    return ViewNames.ERROR
} else if(userList.size() == 1){
    Object aObject = userList.get(0);
    if(null != aObject && aObject instanceof UserDTO){
        UserDTO user = (UserDTO)aObject
        Integer userId = user.getId();
        UserInfoDTO userInfo = service.getUserInfo(userId);
        setUserInfo(userInfo);
    }
    setShowStatus("1");
    return ViewNames.SUCCESS;
} else {
    this.setUserList(userList);
    setShowStatus("2");
    return ViewNames.SUCCESS;
}<c:if test="${showStatus == '1'}">
<form ...
.....
</form>
</c:if><c:if test="${showStatus == '2'}">
<script>
   var userList = [];
   <c:forEach var="item" items="${userList}">
    userList.push({"userId":"<c:out value="${item.userId}" />","username":"<c:out value="${item.userName}" />"});
   </c:forEach>
   window.open("userList.do");
</script>
</c:if>
.....
userList.do
...
<script>
  function loadUserList(){
      var userList = opener.userList();
      if(userList == null)return;
      for(var key in userList){
          if(key == "length")continue;
          var user = userList[key];
          var row = $("userList").insertRow(); 
          var cell = row.insertCell();
          cell.innerHTML = user.userId;
          cell = row.insertCell();
          cell.innerHTML = user.userName;
      }
  }
</script>
<body onload="loadUserList()" >
<table id="userList">
  <tr>
     <td>UserId</td>
     <td>UserName</td>
  </tr>
</table>
</body>