title: org.apache.jasper.JasperException: javax.servlet.ServletException: javax.servlet.jsp.JspException: Cannot find bean under name airline_name
body: <p><strong><code>lodable.jsp</code>:</strong></p>
  
  <pre><code>&lt;html:form action="DemoS" method="POST" focus="" &gt;
      Program Name : 
      &lt;html:select property="airline_name" styleId  = "tempId" onchange="onAirlineChange()" &gt;  
      &lt;html:options collection="airline_name" property="value" labelProperty="key" /&gt;  
      &lt;/html:select&gt;  &lt;br/&gt;
      PART NUMBER
      &lt;input type="text" name="part_no"id="part_number"&gt;
      YEAR
      &lt;select name="year" id="year" style="width:200px"&gt;
      &lt;option value="13"&gt;2013&lt;/option&gt;
      &lt;option value="14"&gt;2014&lt;/option&gt;
      &lt;option value="15"&gt;2015&lt;/option&gt;
      &lt;/select&gt;
      &lt;input type="submit" name="Lodable" value ="OK"&gt;
  &lt;/html:form&gt;
  &lt;html:errors/&gt; 
  </code></pre>
  
  <p><strong><code>DemoForm.java</code>:</strong></p>
  
  <pre><code> public class DemoForm extends ValidatorForm{
      private String airline_name;
      private String part_no;
      private String year;
      public String getAirline_name() {
              return airline_name;
          }
  
      public void setAirline_name(String airline_name) {
              this.airline_name = airline_name;
          }
      public String getPre_part_no() {
              return pre_part_no;
          }
  
      public void setPre_part_no(String pre_part_no) {
              this.pre_part_no = pre_part_no;
          }
      public String getYear() {
              return year;
          }
  
      public void setYear(String year) {
              this.year = year;
          }
  
  @Override
  public ActionErrors validate(ActionMapping mapping, HttpServletRequest request)
  {
  ActionErrors errors=new ActionErrors(); 
       if(getPart_no()==null ||getPart_no().length()&lt;1)
  {
  errors.add("part_no",new ActionMessage("errors.required","part_no"));
  }
  if(getYear()==null ||getYear().length()&lt;1)
  {
  errors.add("Year",new ActionMessage("errors.required","Year"));
  }
  }
  }
  </code></pre>
  
  <p><strong>Extract of <code>Struts-config.xml</code>:</strong></p>
  
  <pre><code>&lt;form-beans&gt;
    &lt;form-bean name="DemoForm" type="com.me.form.DemoForm" scope="session" /&gt;
  &lt;form-beans/&gt;
  &lt;action-mappings&gt;
   &lt;action input="/pages/Lodable.jsp" parameter="method" name="DemoForm" path="/DemoS" scope="session" type="com.woi.action.DemoS" validate="true"&gt;
   &lt;forward name="lodable" path="/pages/Lodable.jsp" /&gt;
   &lt;forward name="save" path="/pages/success.jsp"&gt;&lt;/forward&gt;
   &lt;forward name="fail" path="/pages/fail.jsp"&gt;&lt;/forward&gt;
   &lt;/action&gt;
  &lt;action-mappings/&gt;
  </code></pre>
  
  <p><strong>Collection:</strong></p>
  
  <pre><code>public Map&lt;String,String&gt; airline_name= new HashMap&lt;String,String&gt;();
  airline_name.put("niraj.deshmukh","template1 ");
  airline_name.put("user1","template1 ");
  airline_name.put("user2","template2 ");
  airline_name.put("user3","template3 ");
  request.setAttribute("airline_name", airline_name);
  </code></pre>
  
  <p><strong>Exception:</strong></p>
  
  <pre><code>org.apache.jasper.JasperException: javax.servlet.ServletException: javax.servlet.jsp.JspException: Cannot find bean under name airline_name
      org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:585)
      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:455)
      org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
      org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
      org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1083)
      org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:295)
      org.apache.struts.action.RequestProcessor.internalModuleRelativeForward(RequestProcessor.java:1027)
      org.apache.struts.tiles.TilesRequestProcessor.internalModuleRelativeForward(TilesRequestProcessor.java:374)
      org.apache.struts.action.RequestProcessor.processValidate(RequestProcessor.java:995)
      org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:198)
      org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
      org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
  </code></pre>