how do i create an arraylist inside jsp using jstl
问题 I want to collect values from a JSP page and pass it dynamically to another JSP page with the help of JSTL. How can I do this? 回答1: You use a request scoped HashMap for that. Example 1) Declare the HashMap in each JSP you want to insert or access the list of values. <jsp:useBean id="map" class="java.util.HashMap" scope="request"/> Note: The scope="request" is what makes it accessible in other JSPs. 2) Stuff information into the HashMap <c:set target="${requestScope.map}" property="city" value