0
<div class="body">
   <selected name ="multSelectSkill" id="optgroup" class="ms" multiple="multiple">
    <optgroup label="GRUPO 1">
       <c:forEach items="${skillsOperador}" var="skillsOperador">
          <option value="${skillsOperador.id}" selected="${skillsOperador.operadorSkill.statusSkill == 'Y'}>${skillsOperador.nome</option>
Is it possible to use the attribute this way? Because it’s not working; it’s selecting all the values. I need to select only the values that have the statusSkill equal to Y; 
What language is that? Another thing: try not to put code prints in your questions. Instead, paste the code itself. This makes it easier for people who use the site search.
– Bruno Peres
I am using JSTL in html.
– Kennedy Anderson
@Kennedyanderson Tag appropriate to the technology you are using in the question. So you’ll have a better chance of getting her to someone who knows the answer.
– Pablo Almeida
Thanks for your help, I’m making the necessary changes.
– Kennedy Anderson
How much sense does it make to define the value of
varequal toitemson the tagforEach? Wouldn’t that override the variable? Try doing something like:${var.statusKill == 'Y' ? "selected" : ""}– Woss
The name of var does not interfere because it works on other pages, such as "create operator". But I can test.
– Kennedy Anderson