package com.fuSang.servlet;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.web.context.support.WebApplicationContextUtils;
import com.fuSang.loginBo.Login;
import com.fuSang.loginBo.LoginImpl;
public class LoginServlet extends HttpServlet {
Login login;
String sss;
public void setLogin(Login login) {
this.login = login;
}
public void setSss(String sss){
this.sss = sss;
}
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException{
System.out.println(this);
System.out.println(sss);
System.out.println(login);
System.out.println("okokokokokokokokokok");
Object dataSource = WebApplicationContextUtils.getWebApplicationContext(getServletContext()).getBean("dataSource");
System.out.println(dataSource);
LoginImpl login = (LoginImpl) WebApplicationContextUtils.getWebApplicationContext(getServletContext()).getBean("login");
System.out.println(login);;
}
protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException{
doGet(req, resp);
}
}