title: pass map key attribute from servlet to jsp
body: <p>I want to get name of employee in a LinkedHashMap key from servlet to jsp.</p>
  
  <p>I have this code in java class View.java</p>
  
  <pre><code>LinkedHashMap&lt;Employee, LinkedHashMap&lt;Skill, String&gt;&gt;() employeeSkills = new LinkedHashMap&lt;Employee, LinkedHashMap&lt;Skill, String&gt;&gt;();
  </code></pre>
  
  <p>Class View has setters and getters for employeeSkills.</p>
  
  <p>Class Employee has name and id attributes with setters and getters.</p>
  
  <p>JSP Code:</p>
  
  <pre><code>&lt; c:forEach var="employeeSkills" items="${employeeSkills}" &gt;
      &lt;td&gt;${employeeSkills.key.name}&lt;/td&gt;
  &lt;/c:forEach&gt;
  </code></pre>
  
  <p>but i get this error</p>
  
  <blockquote>
    <p>javax.el.PropertyNotFoundException: Property 'name' not readable on type java.lang.String</p>
  </blockquote>
  
  <p>Employee Class:</p>
  
  <pre><code>    class Employee{
      String id;
      String name;
      /**
       * @return the id
       */
      public String getId() {
          return id;
      }
      /**
       * @param id the id to set
       */
      public void setId(String id) {
          this.id = id;
      }
      /**
       * @return the name
       */
      public String getName() {
          return name;
      }
      /**
       * @param name the name to set
       */
      public void setName(String name) {
          this.name = name;
      }
      public Employee(String id, String name) {
          super();
          this.id = id;
          this.name = name;
      }
  
  
  }
  </code></pre>