Click here to Skip to main content
14,877,803 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
@RequestMapping(value="/create",method = RequestMethod.POST, produces = "text/html")
public String create( Model uiModel, @Valid BillOfMaterial billOfMaterial, BindingResult bindingResult,HttpServletRequest httpServletRequest) {
if (bindingResult.hasErrors()) {
populateEditForm(uiModel, billOfMaterial);
return "billofmaterials/create";
return "redirect:/billofmaterials/";

Problem is Post method not working and data not submitting into database i.e Mysql

	<div class="content-wrapper">
		Form creation<small>Bill Of Materials</small>
		<div class="container-fluid">
			<div class="row">
				<div class="col-lg-12">
					<div class="panel panel-default">
						<div class="panel-heading">
							Form | <small>Bill of materials</small>
						<div class="table-responsive">
					<c:url value="/create" var="form"/>
								<form:form action="{$form}" method="POST" modelAttribute="billOfMaterial">
									<table id="datatableBill" class="table table-bordered">
													<td><form:input path="apcPartNumber"/></td>
													<td><form:input path="subPartNumber"/></td>
													<td><form:input path="description"/></td>
													<td><form:input path="revisions"/></td>
													<td><form:input path="numberOfSubPartsPerBuyPartNumber"/></td>
													<td><form:input path="category"/></td>
													<td>Raw Material</td>
													<td><form:input path="rawMaterial"/></td>
						                    		<td><input type="submit" value="create" /></td>
									<!-- <input type="submit" value="create" onClick="buttonpopup"/> -->

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900