struts2 action 中操作request

HttpServletRequest request = ServletActionContext.getRequest();
request.setAttribute("msg", msg);

 

 

//遍历maps

<c:forEach var="map" items="${showMap}">
            <td>${map.key}</td>
            <td>${map.value}</td>
</c:forEach>

 

//for循环

    <c:forEach var="number" begin="1" end="9" step="1">
        ${number}
    </c:forEach>

你可能感兴趣的:(struts2)