samedi 28 mars 2015

getting always 500 failed to load resources Spring

I have a jsp where i use spring form tags and everything work fines until before. I had changed some things in jsp and controller and started continuously getting 500 server error and no related log to show error and even on console. Don't understand what caused this error and upon this i wasted so much time and feel required help here.


My pojo



public class TransferInvoiceForm {
private List<TransferInvoice> TrinvoiceList;
//Getters and setters


My controller method @Controller @RequestMapping("/asset/invoice")



//some other methods here

@RequestMapping(value ="transferInvoiceHdrForm", method = RequestMethod.GET)
protected ModelAndView showForm(final HttpServletRequest request, final HttpServletResponse response)throws Exception {


TransferInvoiceForm transferInvoice = new TransferInvoiceForm();
List<TransferInvoice> transferinvoice= transferInvoiceHdrService.getAssetCategoriesandTransfer();
transferInvoice.setTrinvoiceList(transferinvoice);

return new ModelAndView("asset/transferInvoiceHdrForm", "transferInvoice", transferInvoice);
}


and in my Jsp



<form:form method="post" action="/asset/invoice/searchctr" modelAttribute="transferInvoice">
<fieldset>
<form:select path="TrinvoiceList" class="col-xs-12 col-lg-5 form-group">
<form:option value="0" selected="true">All</form:option>
<c:forEach var="transferinvoiceType" items="${transferInvoice.TrinvoiceList}">
<form:option value="${transferinvoiceType.assetName}"></form:option>
</c:forEach>
</form:select>
<form:select path="TrinvoiceList" class="col-xs-12 col-lg-5 form-group">
<form:option value="0" selected="true">All</form:option>
<c:forEach var="transferinvoiceType" items="${transferInvoice.TrinvoiceList}">
<form:option value="${transferinvoiceType.assettoLocation}"></form:option>
</c:forEach>
</form:select>

<button class="btn btn-primary" type="submit" class="col-xs-12 col-lg-6 form-group">
<fmt:message key="button.search" />
</button>
</fieldset>
</form:form>


And in other jsp



<form:form method="post" action="/asset/invoice/transferInvoiceConfirm" modelAttribute="transferInvoice">
<c:forEach items="${transferInvoice.TrinvoiceList}" var="invoice" varStatus="status">
</c:forEach>
<table id="assets-tbl" border="1"
class="table table-bordered table-hover table-striped">
<thead>
<tr>
<th><input id="selectall" type="checkbox" value=""></th>
<th><fmt:message key="asset.scanCode.serialNo" /></th>
<th><fmt:message key="asset.modelNo"/></th>
<th><fmt:message key="asset.name" /></th>
<th><fmt:message key="asset.invoice.toLocation" /></th>
<th><fmt:message key="asset.invoice.invoiceDate" /></th>
</tr>
</thead>
<tbody id="assets-tbl-body" >
<tr>
<td><form:checkbox path="TrinvoiceList[${status.index}].check"/></td>
<td><form:hidden path="TrinvoiceList[${status.index}].scanserialCode"/>${invoice.scanserialCode}</td>
<td><form:hidden path="TrinvoiceList[${status.index}].modelNum"/>${invoice.modelNum}</td>
<td><form:hidden path="TrinvoiceList[${status.index}].assetName"/>${invoice.assetName}</td>
<td><form:hidden path="TrinvoiceList[${status.index}].assettoLocation"/>${invoice.assettoLocation}</td>
<td><form:hidden path="TrinvoiceList[${status.index}].actualTransferDate"/>${invoice.actualTransferDate}</td>
</tr>
</tbody>
</table>
<div class="panel-footer">
<div class="row">
<div class="col-lg-7 col-sm-offset-5">
<input class="btn btn-primary" type="submit" value="Confirm">
</div>
</div>
</div>
</form:form>


and the controller method is called from



<a href='<c:url value="/asset/invoice/transferInvoiceHdrForm" />' style="float: right">


Looking for help. Thanks


Aucun commentaire:

Enregistrer un commentaire