src/com/action/StudentQCSave.java
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
package com.action;
import java.io.PrintWriter;
import java.util.Calendar;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import org.apache.struts2.ServletActionContext;
import com.opensymphony.xwork2.ActionSupport;
import com.bean.*;
import com.dao.*;
public class StudentQCSave extends ActionSupport {
//下面是Action内用于封装用户请求参数的属性
private String Student_ID ;
private String Out_Remark ;
public String getOut_Remark() {
return Out_Remark;
}
public void setOut_Remark(String outRemark) {
Out_Remark = outRemark;
}
public String getStudent_ID() {
return Student_ID;
}
public void setStudent_ID(String studentID) {
Student_ID = studentID;
}
//处理用户请求的execute方法
public String execute() throws Exception {
//解决乱码,用于页面输出
HttpServletResponse response=null;
response=ServletActionContext.getResponse();
response.setContentType("text/html;charset=UTF-8");
response.setCharacterEncoding("UTF-8");
PrintWriter out = response.getWriter();
//创建session对象
HttpSession session = ServletActionContext.getRequest().getSession();
//验证是否正常登录
if(session.getAttribute("id")==null){
out.print("<script language='javascript'>alert('请重新登录!');window.location='Login.jsp';</script>");
out.flush();out.close();return null;
}
//修改学生状态
StudentBean cnbean=new StudentBean();
cnbean=new StudentDao().GetBean(Integer.parseInt(Student_ID));
cnbean.setStudent_State("迁出");
new StudentDao().Update(cnbean);
后面还有 33 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。