9 Replies Latest reply: Mar 26, 2008 9:56 AM by 807591 RSS

    sorting a map collection properly

    807591
      Considering that is meant to sort some map data
       for (Iterator it = map.keySet().iterator(); it.hasNext();) {
                                  Object key = it.next();
                                  %>
                       key
                                  <%
                              }
      When I display the key I find that if i havve say

      1 2 3 4 5 6 7 8 9 10 11 12

      it displays in this order

      1 10 11 12 3 4 5 6 7 8 9

      this is bad sorting and will like to know what could be the best solution in this case