Package com.fuSang.servlet

Source Code of com.fuSang.servlet.LoginServlet

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);
  }
 
}
TOP

Related Classes of com.fuSang.servlet.LoginServlet

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.