JSP页面:<li><a href="Student_Query_Electric_bill?type=0&studentnum=<s:property value="#session.loginUserNum"/>" target="MainFrame">电费</a></li>struts.xml代码: <action name="Student_Query_Electric_bill" class="action.BillAction" method="studnetQueryBill()">
<result name="student_QueryBill_success">/bill/student_electric_bill.jsp</result>
</action>Java代码: public String studnetQueryBill(){
BillDao bdao = new BillDaoImpl();
String studentNum = request.getParameter("studentnum");
String type = request.getParameter("type");
Bill bill = bdao.studentQueryBill(studentNum,type);
session.setAttribute("Bill", bill);
return "student_QueryBill_success";
}
添加回答
举报
0/150
提交
取消