|
|
|
|
package com.action;
|
|
|
|
|
|
|
|
|
|
import com.bean.StudentBean;
|
|
|
|
|
import com.dao.StudentDao;
|
|
|
|
|
import com.opensymphony.xwork2.ActionSupport;
|
|
|
|
|
import org.apache.struts2.ServletActionContext;
|
|
|
|
|
|
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
import javax.servlet.http.HttpSession;
|
|
|
|
|
import java.io.PrintWriter;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public class StudentUpdate extends ActionSupport {
|
|
|
|
|
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Action<6F><6E><EFBFBD><EFBFBD><EFBFBD>ڷ<EFBFBD>װ<EFBFBD>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
private String Student_ID;
|
|
|
|
|
private StudentBean cnbean;
|
|
|
|
|
public String getStudent_ID() {
|
|
|
|
|
return Student_ID;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void setStudent_ID(String studentID) {
|
|
|
|
|
Student_ID = studentID;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public StudentBean getCnbean() {
|
|
|
|
|
return cnbean;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void setCnbean(StudentBean cnbean) {
|
|
|
|
|
this.cnbean = cnbean;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>execute<74><65><EFBFBD><EFBFBD>
|
|
|
|
|
public String execute() throws Exception {
|
|
|
|
|
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>룬<EFBFBD><EBA3AC><EFBFBD><EFBFBD>ҳ<EFBFBD><D2B3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
HttpServletResponse response=null;
|
|
|
|
|
response=ServletActionContext.getResponse();
|
|
|
|
|
response.setContentType("text/html;charset=UTF-8");
|
|
|
|
|
response.setCharacterEncoding("UTF-8");
|
|
|
|
|
PrintWriter out = response.getWriter();
|
|
|
|
|
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD>session<6F><6E><EFBFBD><EFBFBD>
|
|
|
|
|
HttpSession session = ServletActionContext.getRequest().getSession();
|
|
|
|
|
//<2F><>֤<EFBFBD>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼
|
|
|
|
|
if(session.getAttribute("id")==null){
|
|
|
|
|
out.print("<script language='javascript'>alert('<27><><EFBFBD><EFBFBD><EFBFBD>µ<EFBFBD>¼<EFBFBD><C2BC>');window.location='Login.jsp';</script>");
|
|
|
|
|
out.flush();out.close();return null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//<2F><>ѯ
|
|
|
|
|
cnbean=new StudentDao().GetBean(Integer.parseInt(Student_ID));
|
|
|
|
|
return SUCCESS;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//<2F>ж<EFBFBD><D0B6>Ƿ<EFBFBD><C7B7><EFBFBD>ֵ
|
|
|
|
|
private boolean isInvalid(String value) {
|
|
|
|
|
return (value == null || value.length() == 0);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD>
|
|
|
|
|
public static void main(String[] args) {
|
|
|
|
|
System.out.println();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|