컨트롤러, 커맨드 구조 추가하여 연동
This commit is contained in:
11
hospital/src/main/java/command/Command.java
Normal file
11
hospital/src/main/java/command/Command.java
Normal file
@@ -0,0 +1,11 @@
|
||||
package command;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
public interface Command {
|
||||
public String exec(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException;
|
||||
}
|
||||
14
hospital/src/main/java/command/HomeCommand.java
Normal file
14
hospital/src/main/java/command/HomeCommand.java
Normal 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 HomeCommand implements Command {
|
||||
public String exec(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException{
|
||||
|
||||
return "home.jsp";
|
||||
}
|
||||
}
|
||||
17
hospital/src/main/java/command/LoginCommand.java
Normal file
17
hospital/src/main/java/command/LoginCommand.java
Normal 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 LoginCommand implements Command {
|
||||
@Override
|
||||
public String exec(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException{
|
||||
//TODO : DB작업 필요
|
||||
|
||||
|
||||
return "views/student/loginForm.jsp";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user