0
有人可以帮我这个错误无论BindingResult也不是为bean名称平原目标对象zipbean'可以作为请求属性
的index.jsp
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<html>
<head>
<body>
<jsp:include page="links.jsp"/>
<script src="<%=request.getContextPath()%>/js/welcome.js"></script>
<form:form action="${pageContext.request.contextPath}/Customer" method="POST" modelAttribute="zipbean">
<input type="text" id="zip" name="zip" class="form-control search ui-autocomplete" onkeypress=" return validate(event)" onkeydown="getData('${pageContext.request.contextPath}/ZipController/autoComplete');" />
<form:button path="zipone" class="btn btn-success">Get a Quote</form:button>
</center>
</form:form>
</body>
</html>
CustomerController
@Controller
@RequestMapping("/Customer")
public class CustomerController
{
@Autowired
ZipDao zipDao;
@RequestMapping(method = RequestMethod.GET)
public String init(HttpServletRequest request,HttpServletResponse responce,ModelMap model)
{
System.out.println("customer page started");
ZipBean zipbean=new ZipBean();
model.addAttribute("zipbean", zipbean);
return "customer";
}
}
而且我有一些文本框客户页面显示
如果在同一个jsp中有select属性会怎么样。我必须添加表单:select? –
是 - 看看春天的文档,但语法是99%类似于经典的标签:)主要是名称= 属性中的路径 – niilzon