1. 임직원 로그인 페이지 추가

2. 환자 로그인, 회원가입 페이지 추가
This commit is contained in:
mcutegs2
2020-06-10 16:59:30 +09:00
parent ab54be7072
commit d902a4a65a
9 changed files with 262 additions and 8 deletions

View File

@@ -6,12 +6,12 @@ import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
public class LoginCommand implements Command {
public class UserLoginCommand implements Command {
@Override
public String exec(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException{
//TODO : DB작업 필요
return "Login.jsp";
return "UserLogin.jsp";
}
}

View File

@@ -0,0 +1,14 @@
package command;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
public class patientJoinCommand implements Command{
@Override
public String exec(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException{
return "patientJoin.jsp";
}
}

View File

@@ -0,0 +1,17 @@
package command;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
public class patientLoginCommand implements Command {
@Override
public String exec(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException{
//TODO : DB작업 필요
return "patientLogin.jsp";
}
}

View File

@@ -13,8 +13,10 @@ import javax.servlet.http.HttpServletResponse;
import command.Command;
import command.HomeCommand;
import command.LoginCommand;
import command.UserJoinCommand;
import command.UserLoginCommand;
import command.patientJoinCommand;
import command.patientLoginCommand;
@WebServlet("/Fcontroller")
public class Fcontroller extends HttpServlet {
@@ -28,10 +30,12 @@ public class Fcontroller extends HttpServlet {
public void init(ServletConfig config) throws ServletException {
// TODO Auto-generated method stub
list = new HashMap<String, Command>();
list.put("/login.do", new LoginCommand()); //로그인 처리
list.put("/home.do", new HomeCommand()); //처음 보여주는 페이지;
list.put("/UserLogin.do", new UserLoginCommand()); // 임직원 로그인 처리
list.put("/patientlogin.do", new patientLoginCommand()); // 환자 로그인 처리
list.put ("/UserJoin.do", new UserJoinCommand()); // 임직원 회원가입 페이지
list.put ("/patientJoin.do", new patientJoinCommand()); // 환자 회원가입 페이지
//이 부분에 계속적으로 매핑을 추가하면 됨
}