title: Can I have more than 1 form action(form inside form) in single jsp using hibernate
body: <p>In this jsp, I have used 2 form actions, one to save the role(table:defining role), and other to call the drop list from other table(table: solutionList).</p>
  
  <p>After clicking on submit, it is not doing anything. </p>
  
  <p>If i remove this form(solutionMaster.html)</p>
  
  <p>Im getting this error "  Invalid property 'sMName' of bean class [com.mode;.definingrole]: Bean property 'sMName' is not readable or has an invalid getter method: Does the return type of the getter match the parameter type of the setter?.</p>
  
  <p>Yes, I know the reason, Because the column 'sMName' was not the part of defining role table. what to do with this.</p>
  
  <p>The Thing i want to know is,</p>
  
  <ol>
  <li>Can we create form inside form?</li>
  </ol>
  
  <p>2.Without creating another form, How can i get the column values of other table to defining role table?</p>
  
  <p>Please help.</p>
  
  <p>Thanks in advance.!!!</p>
  
  <pre><code>  &lt;div class="modal inmodal" id="myModalForRole" tabindex="-1"
                      role="dialog" aria-hidden="true"&gt;
                      &lt;div class="modal-dialog"&gt;
                          &lt;div class="modal-content animated bounceInRight"&gt;
                              &lt;div class="modal-header"&gt;
                                  &lt;button type="button" class="close" data-dismiss="modal"&gt;
                                      &lt;span aria-hidden="true"&gt;&amp;times;&lt;/span&gt;&lt;span class="sr-only"&gt;Close&lt;/span&gt;
                                  &lt;/button&gt;
                                  &lt;i class="fa fa-laptop modal-icon"&gt;&lt;/i&gt;
                                  &lt;h4 class="modal-title"&gt;Define Role&lt;/h4&gt;
  
                              &lt;/div&gt;
                              &lt;div class="modal-body"&gt;
                                  &lt;form:form action="newRoleDetails.html" method="post"
                                      commandName="deftemp" id="deftemp"&gt;
                                      &lt;div class="row"&gt;
                                          &lt;div class="form-group"&gt;
                                          &lt;form:form action="solutionName.html" method="post"
                                                  commandName="soltemp" id="soltemp"&gt; 
                                              &lt;div class="col-sm-6"&gt;
                                                  &lt;label&gt;Solutions*&lt;/label&gt;&lt;br&gt;
  
  
                                                  &lt;form:select path="sMName" class="form-control"
                                                      id="sMName"&gt;
                                                      &lt;form:option value="" label="--select--"&gt;&lt;/form:option&gt;
                                                      &lt;c:forEach var="solutionList" items="${solutionList}"
                                                          varStatus="loop"&gt;
                                                          &lt;form:option value="${solutionList}"
                                                              label="${solutionList}"&gt;
                                                          &lt;/form:option&gt;
                                                      &lt;/c:forEach&gt;
                                                  &lt;/form:select&gt;
                                              &lt;/div&gt;
                                               &lt;/form:form&gt; 
                                          &lt;/div&gt;
                                      &lt;/div&gt;
                                      &lt;div class="row"&gt;
                                          &lt;div class="form-group"&gt;
                                              &lt;div class="col-sm-6"&gt;
                                                  &lt;label&gt;Parent Role*&lt;/label&gt;&lt;br&gt;
                                                  &lt;form:textarea path="ParentRole" id="ParentRole"
                                                      class="form-control" placeholder="Enter the Parent Role" /&gt;
                                              &lt;/div&gt;
                                          &lt;/div&gt;
                                      &lt;/div&gt;
                                      &lt;div class="row"&gt;
                                          &lt;div class="form-group"&gt;
                                              &lt;div class="col-sm-6"&gt;
                                                  &lt;label&gt;Sub Role*&lt;/label&gt;&lt;br&gt;
                                                  &lt;form:textarea path="SubRole" id="SubRole"
                                                      class="form-control" placeholder="Enter the Child role" /&gt;
                                              &lt;/div&gt;
                                          &lt;/div&gt;
                                      &lt;/div&gt;
                                      &lt;br&gt;
                                      &lt;br&gt;
                                      &lt;div class="modal-footer"&gt;
                                          &lt;button type="button" class="btn btn-white"
                                              data-dismiss="modal"&gt;Close&lt;/button&gt;
                                          &lt;button type="submit" class="btn btn-primary"&gt;Submit
                                          &lt;/button&gt;
                                      &lt;/div&gt;
                                  &lt;/form:form&gt;
                              &lt;/div&gt;
  </code></pre>
  
  <p>Models: (solutionlist.java)</p>
  
  <pre><code>package com.model;
  
  import java.io.Serializable;
  import java.text.SimpleDateFormat;
  import java.util.Date;
  
  import javax.persistence.Column;
  import javax.persistence.Entity;
  import javax.persistence.GeneratedValue;
  import javax.persistence.GenerationType;
  import javax.persistence.Id;
  import javax.persistence.Table;
  
  
  @Entity
  @Table (name="solutionlist")
  public class solutionlist implements Serializable{
  
      private static final long serialVersionUID = 1L;
  
      @Id
      @GeneratedValue(strategy=GenerationType.IDENTITY)
      @Column(name="solutionId",nullable = false,columnDefinition = "UNSIGNED INT(4)")
      Integer solutionId;
  
      @Column(name="solutionName")
      String solutionName;
  
      @Column(name="solutionOwner")
      String solutionOwner;
  
      @Column(name="ownerMailId")
      String ownerMailId;
  
      @Column(name="additionDate")
      String additionDate;
  
      public Integer getSolutionId() {
          return solutionId;
      }
  
      public void setSolutionId(Integer solutionId) {
          this.solutionId = solutionId;
      }
  
      public String getSolutionName() {
          return solutionName;
      }
  
      public void setSolutionName(String solutionName) {
          this.solutionName = solutionName;
      }
  
      public String getSolutionOwner() {
          return solutionOwner;
      }
  
      public void setSolutionOwner(String solutionOwner) {
          this.solutionOwner = solutionOwner;
      }
  
      public String getOwnerMailId() {
          return ownerMailId;
      }
  
      public void setOwnerMailId(String ownerMailId) {
          this.ownerMailId = ownerMailId;
      }
  
      public String getAdditionDate() {
          return  new SimpleDateFormat("yyyy-MM-dd HH-mm-ss.SSS")
          .format(new Date());
      }
  
      public void setAdditionDate(String additionDate) {
          this.additionDate = additionDate;
      }
  }
  </code></pre>
  
  <p>definingrole.java</p>
  
  <pre><code>package com.model;
  
  import java.io.Serializable;
  
  import javax.persistence.Column;
  import javax.persistence.Entity;
  import javax.persistence.GeneratedValue;
  import javax.persistence.GenerationType;
  import javax.persistence.Id;
  import javax.persistence.Table;
  
  
  @Entity
  @Table(name="definingrole")
  public class definingrole implements Serializable{
  
      private static final long serialVersionUID = 1L;
  
      @Id
      @GeneratedValue(strategy=GenerationType.IDENTITY)
      @Column(name="SNo")
      Integer SNo;
  
      @Column(name="Solutions")
      String Solutions;
  
      @Column(name="ParentRole")
      String ParentRole;
  
      @Column(name="SubRole")
      String SubRole;
  
      public Integer getSNo() {
          return SNo;
      }
  
      public void setSNo(Integer sNo) {
          SNo = sNo;
      }
  
      public String getSolutions() {
          return Solutions;
      }
  
      public void setSolutions(String solutions) {
          Solutions = solutions;
      }
  
      public String getParentRole() {
          return ParentRole;
      }
  
      public void setParentRole(String parentRole) {
          ParentRole = parentRole;
      }
  
      public String getSubRole() {
          return SubRole;
      }
  
      public void setSubRole(String subRole) {
          SubRole = subRole;
      }
  }
  </code></pre>
  
  <p>Controller : newRoleDetails.html</p>
  
  <pre><code>@RequestMapping(value=NEWROLEDETAILS_PATH)
      public String newRoleDetails(Map&lt;String, Object&gt; model, definingrole value,solutionlist sol) throws Exception {
          Authentication auth = SecurityContextHolder.getContext().getAuthentication();
          String name = auth.getName();
          String nameOfUser=TemplateService.getEmpNameOfUser(name);
          model.put("nameOfUser",nameOfUser);
          String userid=loginService.getUserId();
          String role=loginService.getRole(); 
  
          TemplateService.newRoleDetails(value);
          definingrole deftemp=new definingrole();
          model.put("deftemp", deftemp);
          solutionlist s = new solutionlist();
  
          ArrayList&lt;templateDetails&gt; listOfTemplate=TemplateService.listTemplateDetails(role,userid);
          model.put("listOfTemplate",listOfTemplate);
              return TEMPLATESUMMARY;
      }
  </code></pre>
  
  <p>controller : solutionName.html</p>
  
  <pre><code>@RequestMapping("/solutionlist.html")
      public String solutionName(Map&lt;String, Object&gt; model,solutionlist sol) throws Exception {
          Authentication auth = SecurityContextHolder.getContext().getAuthentication();
          String name = auth.getName();
          String nameOfUser=TemplateService.getEmpNameOfUser(name);
          model.put("nameOfUser",nameOfUser);
          solutionlist soltemp = new solutionlist();
          model.put("soltemp", soltemp);
          ArrayList&lt;String&gt; solutionList=TemplateService.getSolutionListForTemplate();
          model.put("solutionList", solutionList);
          return REDIRECT_TEMPLATESUMMARY_URL;
      }
  </code></pre>