Spring JSP to Controller -
i facing problem sending spring controller. try many way got error
neither bindingresult nor plain target object bean name 'command' available request attribute
here jsp page..
<div class="container"> <div class="row"> <div class="col-md-4"></div> <div class="col-md-4 well-lg"> <spring:url value="/fetch/page" var="fetchpage" /> <form:form method="get" action="${fetchpage}"> <div class="center-block "> <label class="control-label"> name</label> <form:input placeholder="customer name" class="form-control" path="name" /> </div> <br /> <button type="submit" class="btn btn-primary">save</button> </form:form> </div> <div class="col-md-4"></div> </div> </div>
and here controller
@requestmapping(value = "/fetch/page/", method = requestmethod.get) public string getpagefromjsp(@pathvariable("id") string name, model model) { system.out.println(name); return "home"; }
Comments
Post a Comment