JSP Servlet
-
[MessageSystem] CommandJSP Servlet 2022. 7. 15. 15:19
1. Command package com.smhrd.command; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; public interface Command { //객체 생성해서 메소드 만드는 과정을 단순화 하기 위해서 interface생성 //추상메소드 : 값이 없고 메소드의 기본값을 설정해줌 //우리는 인테페이스르 상속 받아서 메소드를 강제적으로 구현할 것 //메소드의 이름은 다 같게 만들어 오버라이딩(재정의)해서 기능 구현 할 것 public abstract String execute(HttpServletRequest request, HttpServletResponse respo..
-
[MessageSystem] FrontControllerJSP Servlet 2022. 7. 15. 15:18
1. FrontController package com.smhrd.frontcontroller; import java.io.IOException; import java.net.URLEncoder; import javax.servlet.RequestDispatcher; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSes..
-
[MessageSystem] Controller_ClassJSP Servlet 2022. 7. 15. 15:16
1. JoinService insert into messageboard values(num_board.nextval,#{title},#{writer},#{filename},#{content},sysdate) select * from messageboard order by b_day desc select * from messageboard where num = #{num} delete from messageboard where num=#{num} 2. LoginService package com.smhrd.controller_class; import javax.servlet.RequestDispatcher; import javax.servlet.http.HttpServletRequest; import ja..
-
[MessageSystem] DataBaseJSP Servlet 2022. 7. 15. 15:09
1. SqlSessionManager import java.io.IOException; import java.io.Reader; import org.apache.ibatis.io.Resources; import org.apache.ibatis.session.SqlSessionFactory; import org.apache.ibatis.session.SqlSessionFactoryBuilder; public class SqlSessionManager { static SqlSessionFactory sqlSession; static { String resource="com/smhrd/database/mybatis-config.xml"; Reader reader; try { reader = Resources...
-
[MessageSystem] ModelJSP Servlet 2022. 7. 15. 14:57
1. MemberVO import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; @Data @AllArgsConstructor @NoArgsConstructor public class MemberVO { private String email; private String pw; private String phone; private String address; } 2. DAO import java.util.ArrayList; import org.apache.ibatis.session.SqlSession; import org.apache.ibatis.session.SqlSessionFactory; import co..
-
-
-