求助啊
我使用jquery+Springmvc实现ajax,获得后台传递的集合。出现了500 Internal Server Error。求大神解救。。。
页面代码如下:
function AjaxGetData( index, size) {
$.ajax({
url: "${pageContext.request.contextPath}/showAllProduct.do",
type: "Get",
data: "pagenum=" + index + "&pagesize=" + size,
dataType: "json",
success: function (json) {
var html = "";
html += "<table>";
html += "<thead>";
html += "<tr><td>商品编号</td><td>商品名</td><td>商品规格</td><td>计量单位</td><td>商品类别</td><td>产地</td><td>建议采购价格</td><td>建议销售价格</td><td>操作</td></tr>";
html += "</thead>";
html += "<tbody>";
for(position in json){
html += "<tr>";
html += "<td>"+json[position].productID+"</td>";
html += "<td>"+json[position].name+"</td>";
html += "<td>"+json[position].model+"</td>";
html += "<td>"+json[position].baseunit+"</td>";
html += "<td>"+json[position].type.type+"</td>";
html += "<td>"+json[position].productAddress+"</td>";
html += "<td>"+json[position].suggestPrice+"</td>";
html += "<td>"+json[position].salePrice+"</td>";
html+="<td><input type='button' value='修改' onclick='update("+json[position].productID+")'/><input type='button'value='删除' onclick='deleteEmployee("+json[position].productID+")'/></td>";
html += "</tr>";
}
html += "</tbody>";
html += "<tfoot>";
html += "<tr>";
html += "<td colspan='7'>";
html += "<a href='javascript:void' onclick='GoToFirstPage()' id='aFirstPage' >首页 </a>";
html += "<a href='javascript:void' onclick='GoToPrePage()' id='aPrePage' >上一页 </a>";
html += "<a href='javascript:void' onclick='GoToNextPage()' id='aNextPage'>下一页 </a>";
html += "<input type='text' size='4' /><input type='button' value='Jump' onclick='GoToAppointPage(this)' /> ";