title: How to populate data from servlet to dropdown
body: <p>I Have a servlet where i have returned a list :</p>
  
  <pre><code>protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
          doPost(request, response);
      }
  
      /**
       * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
       */
      protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
          System.out.println("inside doPost of Role Management ---");
          this.context = request.getServletContext();
          UserProperties userProp;
          try{
              userProp= new UserProperties();
              //just a place holder to see if the property file can be read...
              userGroup_DS_Proxy = userProp.ReadProperties("UserGroup_DS_Proxy").toString();
              System.out.println("Properties file location was found in th tomcat folder");
          }catch(Exception ex){
              userProp= new UserProperties(context);
              System.out.println("Fail Safe Mode Activated");
          }
          userGroup_DS_Proxy = userProp.ReadProperties("UserGroup_DS_Proxy").toString();
          roleManagementDebug = Boolean.valueOf(userProp.ReadProperties("RoleManagementDebug").toString());
          RoleManagementDAO roleManagementDAO= new RoleManagementDAO(roleManagementDebug,userGroup_DS_Proxy);
  
          if(roleManagementDebug){
              System.out.println("new post for Role Management");
          }
          List&lt;String&gt; roles = roleManagementDAO.getRoles();
          HttpSession session = request.getSession(true);
          session.setAttribute("RoleList", roles);
      }
  </code></pre>
  
  <p>Now i am passing the list by setting it in HttpSession as : 
  <strong>session.setAttribute("RoleList", roles);</strong></p>
  
  <p>Now i want to get this session value in the jsp and populate a dropdown with this session variable.
  Since i don't have much knowledge of JSP side, It is getting really hard for me to solve this problem. How can i do this? Looking forward to your answers.
  Thanks in advance</p>