package com.demo.action;import java.io.PrintWriter;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServletRequest;import org.apache.struts2.ServletActionContext;import com.demo.bean.Register;
import com.demo.bean.Users;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;public class CheckUserExistsAction extends ActionSupport{
HttpServletResponse response= (HttpServletResponse) ActionContext
.getContext().get(
org.apache.struts2.StrutsStatics.HTTP_RESPONSE);
private String userName;
private String password;
public String getUserName() {
return userName;
}
public void setUserName(String username) {
this.userName = username;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String CheckUser() throws Exception{
Register register = new Register();
boolean exists = register.CheckUserExists(this.getUserName());
response.setContentType("text/html; GBK");
PrintWriter out = response.getWriter(); out.print(exists);
return null;
}
@Override
public String execute() throws Exception {
// TODO Auto-generated method stub
return super.execute();
}}为什么程序执行到红色字体部分就不执行了