title: JSP Error: According to TLD, tag form:input must be empty, but is not
body: <p>I try to create form in JSP and have one problem with input field.
  Here is part of my JSP page:</p>
  
  <pre><code>&lt;section&gt;
      &lt;div class="container"&gt;
          &lt;h4&gt;Add new PC or Laptop&lt;/h4&gt;
          &lt;div class="form"&gt;
              &lt;form:form method="post" action="/app/pc/add" class="form-horizontal" modelAttribute="pc" role="form"&gt;
                  &lt;div class="control-group"&gt;
                      &lt;label class="control-label" for="number"&gt;PC Number&lt;/label&gt;
                      &lt;div class="controls"&gt;
                          &lt;form:input id="number" placeholder="Number" path="number"&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
                  &lt;div class="control-group"&gt;
                      &lt;label class="control-label" for="cpu"&gt;CPU&lt;/label&gt;
                      &lt;div class="controls"&gt;
                          &lt;form:input id="cpu" placeholder="CPU" path="cpu"&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
                  &lt;div class="control-group"&gt;
                      &lt;label class="control-label" for="hdd"&gt;HDD size&lt;/label&gt;
                      &lt;div class="controls"&gt;
                          &lt;form:input id="hdd" placeholder="HDD size" path="hdd"&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
                  &lt;div class="control-group"&gt;
                      &lt;label class="control-label" for="os"&gt;OS&lt;/label&gt;
                      &lt;div class="controls"&gt;
                          &lt;form:select id="os" path="os"&gt;
                              &lt;c:forEach items="&lt;%=com.springapp.mvc.entities.OpSystem.values()%&gt;" var="value"&gt;
                                  &lt;option value="${value}"&gt;${value}&lt;/option&gt;
                              &lt;/c:forEach&gt;
                          &lt;/select&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
                  &lt;div class="control-group"&gt;
                      &lt;label class="control-label" for="office"&gt;Office&lt;/label&gt;
                      &lt;div class="controls"&gt;
                          &lt;form:input id="office" placeholder="Office version" path="office"&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
                  &lt;div class="control-group"&gt;
                      &lt;div class="controls"&gt;
                          &lt;form:button type="submit" class="btn"&gt;Save&lt;/button&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
  
              &lt;/form&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/section&gt;
  </code></pre>
  
  <p>And here is my Controller class:</p>
  
  <pre><code>package com.springapp.mvc.controllers;
  
  import com.springapp.mvc.entities.ComputerRepository;
  import com.springapp.mvc.entities.OpSystem;
  import com.springapp.mvc.entities.Pc;
  import org.springframework.beans.factory.annotation.Autowired;
  import org.springframework.stereotype.Controller;
  import org.springframework.validation.BindingResult;
  import org.springframework.web.bind.annotation.ModelAttribute;
  import org.springframework.web.bind.annotation.RequestMapping;
  import org.springframework.web.bind.annotation.RequestMethod;
  import org.springframework.web.servlet.ModelAndView;
  
  /**
   * Created by aleksandrs on 12/27/13.
   */
  @Controller
  @RequestMapping("/app")
  public class AppController {
      @Autowired
      private ComputerRepository repository;
  
      @RequestMapping("/")
      public ModelAndView getIndex(){
          ModelAndView model = new ModelAndView("index");
          model.addObject("act","");
          return model;
      }
  
      @RequestMapping(value = "/pc/list")
      public ModelAndView getPCList(){
          ModelAndView model = new ModelAndView("index");
          model.addObject("act","devices");
          model.addObject("include","pc_list");
          model.addObject("list",repository.findAll());
          return model;
      }
  
      @RequestMapping(value = "/pc/add", method = RequestMethod.GET)
      public ModelAndView addPc(){
          ModelAndView model = new ModelAndView("index");
          model.addObject("include","pc_add");
          model.addObject("act","devices");
          model.addObject("osTypes", OpSystem.values());
          return model;
      }
  
      @RequestMapping(value = "/pc/add", method = RequestMethod.POST)
      public ModelAndView savePc(@ModelAttribute("pc") Pc pc, BindingResult result){
          repository.save(pc);
          return new ModelAndView("redirect:/app/pc/list");
      }
  
  }
  </code></pre>
  
  <p>And here is an Error:</p>
  
  <pre><code>SEVERE: Servlet.service() for servlet [mvc-dispatcher] in context with path [] threw exception [/WEB-INF/pages/pc_add.jsp (line: 19, column: 24) According to TLD, tag form:input must be empty, but is not] with root cause
  org.apache.jasper.JasperException: /WEB-INF/pages/pc_add.jsp (line: 19, column: 24) According to TLD, tag form:input must be empty, but is not
      at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:42)
      at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:443)
      at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:133)
      at org.apache.jasper.compiler.Parser.parseBody(Parser.java:1633)
      at org.apache.jasper.compiler.Parser.parseOptionalBody(Parser.java:1002)
      at org.apache.jasper.compiler.Parser.parseCustomTag(Parser.java:1274)
      at org.apache.jasper.compiler.Parser.parseElements(Parser.java:1452)
      at org.apache.jasper.compiler.Parser.parseBody(Parser.java:1664)
      at org.apache.jasper.compiler.Parser.parseOptionalBody(Parser.java:1002)
      at org.apache.jasper.compiler.Parser.parseCustomTag(Parser.java:1274)
      at org.apache.jasper.compiler.Parser.parseElements(Parser.java:1452)
      at org.apache.jasper.compiler.Parser.parse(Parser.java:138)
      at org.apache.jasper.compiler.ParserController.doParse(ParserController.java:242)
      at org.apache.jasper.compiler.ParserController.parse(ParserController.java:102)
      at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:198)
      at org.apache.jasper.compiler.Compiler.compile(Compiler.java:373)
      at org.apache.jasper.compiler.Compiler.compile(Compiler.java:353)
      at org.apache.jasper.compiler.Compiler.compile(Compiler.java:340)
      at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:646)
      at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:357)
      at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
      at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:749)
      at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:605)
      at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:544)
      at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:954)
      at org.apache.jsp.WEB_002dINF.pages.index_jsp._jspx_meth_c_005fwhen_005f0(index_jsp.java:278)
      at org.apache.jsp.WEB_002dINF.pages.index_jsp._jspx_meth_c_005fchoose_005f0(index_jsp.java:240)
      at org.apache.jsp.WEB_002dINF.pages.index_jsp._jspService(index_jsp.java:179)
      at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
      at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
      at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
      at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:749)
      at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:487)
      at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:412)
      at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:339)
      at org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:238)
      at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:264)
      at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1208)
      at org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:992)
      at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:939)
      at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856)
      at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:915)
      at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:811)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
      at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:796)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
      at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
      at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)
      at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
      at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      at java.lang.Thread.run(Thread.java:744)
  </code></pre>
  
  <p>Where I have error? Or may be I forgot some dependency in POM file?</p>