Spring标签表单输入

时间:2014-06-18 11:18:35

标签: forms spring tags

我在弹簧标签表单输入中有一些问题.. 如果我使用<form:input> ..将显示错误 java.io.IOException: JspException when evaluating the body但是如果我使用html标签,它就无法连接到数据库。

<form:form method="POST" action="/sampling/insert"
        modelAttribute="sampling">
        <div class="form-row control-group row-fluid">
            <label class="control-label span3" name="populasi" for="normal-field">Population</label>
            <div class="controls span9">
                <form:input path="populasi" type="text" id="normal-field"
                    class="row-fluid" />
            </div>
        </div>
        <div class="form-row control-group row-fluid">
            <label class="control-label span3" for="normal-field">Error
                Rate</label>
            <div class="controls span9">
                <form:input path="tKesalahan" name="tKesalahan" type="text"
                    id="normal-field" class="row-fluid" />
            </div>
        </div>
        <input type="submit" class="btn btn-success" rel="tooltip"
            data-placement="top" value="Submit" />
    </form:form>

1 个答案:

答案 0 :(得分:0)

试试这个:

名称,类型不是有效属性

更改标记属性:

&#13;
&#13;
<form:input path="tKesalahan" id="normal-field" cssClass="row-fluid" />
&#13;
&#13;
&#13;

参考:spring input tag attributes