¿Cómo puedo hacer una selección múltiple en jsp / jstl con el valor seleccionado?

Hola, tengo un usuario con algunos roles User.class

public class User {

 private Long id;
 private String firstName;
 private String lastName;

 private Set<Role> roles = new HashSet<Role>(0);

public Long getId () {return id; } public void setId (ID largo) {this.id = id; }

 public String getFirstName() { return this.firstName; }
 public void setFirstName(String firstname) { this.firstName = firstname; }

 public String getLastName() { return this.lastName; }
 public void setLastName(String lastname) { this.lastName = lastname; }

 public Set<Role> getRoles() { return this.roles; }
 public void setRoles(Set<Role> roles) { this.roles = roles; }
}

Role.class

public class Role {

 private Long id;
 private String name;

 public Long getId() { return id; }
 public void setId(Long id) { this.id = id; }

 public String getName() { return name; }
 public void setName(String name) { this.name = name; }

}

en el archivo jsp quiero hacer una selección múltiple que tendrá todos los roles con los valores seleccionados (roles que tiene el usuario).

He intentado eso:

<select id="roles" name="roles" multiple="true" size="4">
 <c:forEach items="${allRoles}" var="role">
  <option value="${role.id}" <c:if test="${role.id == roleSelected.id}">selected</c:if> >${role.name}</option>
 </c:forEach>
</select>

donde allRoles representa todo el rol, roleSelected representa el usuario.roles. pero no funciona, ¿hay alguna manera de decir algo en jstl como "si rol en user.roles luego seleccionado"? gracias por cualquier consejo

Actualizar:

de alguna manera no funciona, puse un registrador en esa clase tengo esto:

 public static boolean contains(Collection<?> collection, Object object) {
  System.out.println("coll = " + collection.toString());
  System.out.println("obj="+ object.toString());
  System.out.println("res="+ collection.contains(object));
     return collection.contains(object);
   }

en el registro tengo esto, debería resultar verdadero en la segunda prueba:

coll = [Id :2;Code: TESTName: Temp Manager;Enabled: true;Comment: ;]
obj=Id :1;Code: ADMName: ADMIN;Enabled: true;Comment: For Adminstrators;
res=false
coll = [Id :2;Code: TESTName: Temp Manager;Enabled: true;Comment: ;]
obj=Id :2;Code: TESTName: Temp Manager;Enabled: true;Comment: ;
res=false
coll = [Id :2;Code: TESTName: Temp Manager;Enabled: true;Comment: ;]
obj=Id :3;Code: RHHName: TECHNOMEDIA;Enabled: true;Comment: Dfdf;
res=false
coll = [Id :2;Code: TESTName: Temp Manager;Enabled: true;Comment: ;]
obj=Id :4;Code: RESPONSName: Refd;Enabled: true;Comment: Sdsds;
res=false

Respuestas a la pregunta(1)

Su respuesta a la pregunta