0

听到是代码

<spring:form modelAttribute="commonBean" action="saveStock.htm">
<div class="content" align="center">
            <div class="box"><br>
                <h1>
        <spring:label path=""> Stock  Entry</spring:label>

                </h1><br><hr>
        <table>

    <tr>
    <th align='left'><spring:label path="">Item Name: </spring:label>
                    </th>
    <td colspan='5'><spring:input path="" ></spring:input>
        <span style="font-style: italic;color: red;">
        <spring:errors path="" id="iname" onkeyup="iname()">
        <img src="green.png" class="def" id="iname_true"/>
    <img src="cross.png" class="def" id="iname_false"/>
         </spring:errors></span>
    </td>

       </tr>

及其给出的错误

HTTP 错误:500

/WEB-INF/jsp/corefiles/stock.jsp(19,22) PWC6239:根据 TLD,标签 spring:input 必须为空,但不是

请有人建议我如何实现这一目标

4

1 回答 1

0

Change:

<spring:input path="" ></spring:input>

to:

<spring:input path="CommonBeanPropertyName" />

You have to set a path, so that Spring will be able to bind the input field to the corresponding bean property.

Have a look to the documentation .

于 2013-01-17T17:28:11.873 回答