图片添加后保存的是添加路径
例:
<div class="form-group">
<label class="col-sm-3 control-label no-padding-right" for="image1"> 图片1
<%if(product.image1!'' != ''){%>
<img alt="${aa.name!''}" width="50px" height="50px" src="${contextPath}/imageFile/getImage?imagePath=${product.image1!''}" >
<%}%>
</label>
<div class="col-sm-9">
<input name="portraitFile1" type="file" id="image1" placeholder="请上传图片" class="col-xs-10 col-sm-5" value="${aa.image1!''}"/>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label no-padding-right" for="image2"> 图片2
<%if(product.image2!'' != ''){%>
<img alt="${aa.name!''}" width="50px" height="50px" src="${contextPath}/imageFile/getImage?imagePath=${aa.image2!''}" >
<%}%>
</label>
<div class="col-sm-9">
<input name="portraitFile2" type="file" id="image2" placeholder="请上传图片" class="col-xs-10 col-sm-5" value="${aa.image2!''}"/>
</div>
</div>