2 wangxiaoenen wangxiaoenen 于 2015.06.23 22:03 提问

MyEclipse和Tomcat的问题 求哪位大神帮忙指教一下拜托拜托急急急

这是Action包里的

package com.bus.cnu.action;

import com.carver.ptm.core.persistence.base.BaseDao;

import java.util.List;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts2.ServletActionContext;

import com.bus.cnu.service.*;

import com.bus.cnu.vo.BusRoundExceptionManage;

public class DoorExceptionManageAction extends BaseAction {

private static final long serialVersionUID=1L;

private IBusRoundExceptionManageService busroundexceptionmanageservice;

public String QuaryAll(){

HttpServletRequest request=ServletActionContext.getRequest();

List brems=busroundexceptionmanageservice.queryAll();

request.setAttribute("BREMS", brems);

return "success";

}

public String GetBREM(){

HttpServletRequest request=ServletActionContext.getRequest();

Integer bremid=Integer.parseInt(request.getParameter("bremid"));

BusRoundExceptionManage brem=busroundexceptionmanageservice.GetBusRoundExceptionById(bremid);

request.setAttribute("BREM", brem);

return "success";

}

public String GetUpdateBREM(){

HttpServletRequest request=ServletActionContext.getRequest();

Integer bremid=Integer.parseInt(request.getParameter("bremid"));

BusRoundExceptionManage brem=busroundexceptionmanageservice.GetBusRoundExceptionById(bremid);

request.setAttribute("BREM", brem);

return "success";

}

public String Update(){

HttpServletRequest request=ServletActionContext.getRequest();

Integer bremid=Integer.parseInt(request.getParameter("bremid"));

String reason=request.getParameter("manage");

BusRoundExceptionManage brem=busroundexceptionmanageservice.GetBusRoundExceptionById(bremid);

brem.setReason(reason);

if(busroundexceptionmanageservice.Update(brem)){

return "success";

}

return "fail";

}

public IBusRoundExceptionManageService getBusroundexceptionmanageservice() {

return busroundexceptionmanageservice;

}

public void setBusroundexceptionmanageservice(

IBusRoundExceptionManageService busroundexceptionmanageservice) {

this.busroundexceptionmanageservice = busroundexceptionmanageservice;

}

public static long getSerialversionuid() {

return serialVersionUID;

}

}

这是Struts里的
<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">





/common/login.jsp
/common/main.jsp

    <action name="QueryAll" class="DoorExceptionManageAction" method="QuaryAll"> 
        <result name="success">/dispatcher/door_abnormal.jsp</result>

    </action>

    <action name="GetBREM" class="DoorExceptionManageAction" method="GetBREM"> 
        <result name="success">/dispatcher/door_abnormal_detail.jsp</result>

    </action>

    <action name="GetUpdateBREM" class="DoorExceptionManageAction" method="GetUpdateBREM"> 
        <result name="success">/dispatcher/abnormal_handle.jsp</result>
    </action>

    <action name="Update" class="DoorExceptionManageAction"> 
        <result name="success">/dispatcher/abnormal_handle_next.jsp</result>
        <result name="fail">/dispatcher/door_abnormal_detail.jsp</result>
    </action>
</package>


这是报错截图
图片说明

2个回答

Carry_Dominator
Carry_Dominator   2015.06.23 22:23

500错误都是服务器端的错误,你去百度一下tomcat参数配置!

bulusli3
bulusli3   Ds   Rxr 2015.06.24 10:01

在用hibernate查询的时候有参数越界了。ordinal parameter是从下标1开始的,而不是0,你可以检查下是否有地方参数从0开始。

Csdn user default icon
上传中...
上传图片
插入图片