2016-09-15 3 views
0

У меня есть ошибка в первой строке следующей Jsp страницыMissing закрывающий тег «формы: вход»

<%@taglib prefix="form" uri="http://www.springframework.org/tags/form"%> 
    <%@taglib prefix="spring" uri="http://www.springframework.org/tags"%> 
    <html> 
    <head> 
    <meta http-equiv="Content-Type" 
     content="text/html; charset=ISO-8859- 
    1"> 
    <link rel="stylesheet" 
     href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/boo 
    tstrap.min.css"> 
    <title>Products</title> 
    </head> 
    <body> 
     <section> 
      <div class="jumbotron"> 
       <div class="container"> 
        <h1>Products</h1> 
        <p>Add products</p> 
       </div> 
      </div> 
     </section> 
     <section class="container"> 
      <form:form modelAttribute="newProduct" class="form-horizontal"> 
       <fieldset> 
        <legend>Add new product</legend> 
        <div class="form-group"> 
         <label class="control-label col-lg-2 col-lg-2" for="productId">Product 
          Id</label> 
         <div class="col-lg-10"> 
          <form:input id="productId" path="productId" type="text" 
           class="form:input-large" /> 
         </div> 
        </div> 
        <!-- Similarly bind <form:input> tag for 
    name,unitPrice,manufacturer,category,unitsInStock and unitsInOrder 
    fields--> 
        <div class="form-group"> 
         <label class="control-label col-lg-2" for="description">Description</label> 
         <div class="col-lg-10">form:textarea id="description" 
          path="description" rows = "2"/></div> 
        </div> 
        <div class="form-group"> 
         <label class="control-label col-lg-2" for="discontinued">Discontinued</label> 
         <div class="col-lg-10"> 
          <form:checkbox id="discontinued" path="discontinued" /> 
         </div> 
        </div> 
        <div class="form-group"> 
         <label class="control-label col-lg-2" for="condition">Condition</label> 
         <div class="col-lg-10"> 
          <form:radiobutton path="condition" value="New" /> 
          New 
          <form:radiobutton path="condition" value="Old" /> 
          Old 
          <form:radiobutton path="condition" value="Refurbished" /> 
          Refurbished 
         </div> 
        </div> 
        <div class="form-group"> 
         <div class="col-lg-offset-2 col-lg-10"> 
          <input type="submit" id="btnAdd" class="btn btn-primary" 
           value="Add" /> 
         </div> 
        </div> 
       </fieldset> 
      </form:form> 
     </section> 
    </body> 
    </html> 

, делая это jsp я получил ошибку, я новичок, чтобы посмотреть часть и иметь практически нет знания Jstl el, но в то время как обучение весной я застрял в этой ошибке, которая говорит

Несколько аннотаций найденных в этой строке:

> - Missing end tag for 
> "form:input" 
>- Missing end tag for 
> "form:input" 

Я что-то упустил, как это решить? даже небольшой намек приветствуется слишком

Благодаря

+0

в сторону, почему не использовать '' вместо ' 'ты пытался удалить комментарий от своего jsp? – SMA

+0

удалите «форму: ввод» из комментария. он будет интерпретироваться весной или сделать его как пустой тег '' – Jens

+0

@Jens, что тег был в комментариях –

ответ

2

эля также вычислять выражения в комментариях, так что вы должны сделать тег в комментариях, как в «нормальных» страницах

Изменить

<!-- Similarly bind <form:input> tag for 
    name,unitPrice,manufacturer,category,unitsInStock and unitsInOrder 
    fields--> 

в

<!-- Similarly bind <form:input/> tag for 
name,unitPrice,manufacturer,category,unitsInStock and unitsInOrder 
fields--> 
+0

Спасибо большое :) –

Смежные вопросы