Skip to content
This repository has been archived by the owner on Jul 22, 2020. It is now read-only.

Commit

Permalink
merging
Browse files Browse the repository at this point in the history
  • Loading branch information
ek committed May 25, 2015
1 parent d7fd9c3 commit b6eec14
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 71 deletions.
5 changes: 1 addition & 4 deletions WebContent/index.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@
</head>
<body>
<h1>JSP</h1>
<<<<<<< HEAD
<A href="testPage">여기</A><br>
=======
<A href="testPage">여기</A>
>>>>>>> bcd932d7b231f155ef36c372234bf32dabbb4c58

</body>
</html>
4 changes: 0 additions & 4 deletions WebContent/view/test.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@
</tr>
</c:forEach>
</table>
<<<<<<< HEAD
<hr>
<%-- 유저 1의 비밀번호 : ${pass }--%>
=======
>>>>>>> bcd932d7b231f155ef36c372234bf32dabbb4c58
</body>
</html>
25 changes: 3 additions & 22 deletions src/com/controller/RequestController.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,11 @@
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;


/**
<<<<<<< HEAD
* 嚙踝蕭羶嚙踝蕭 嚙踝蕭嚙� 嚙請瘀蕭嚙諸湛蕭.
=======
* 蹂羶擊 濩嬴憮 碟盟棻.
>>>>>>> bcd932d7b231f155ef36c372234bf32dabbb4c58
* 웹 요청 관리 클래스
* @author EK
*
*/
public abstract class RequestController extends HttpServlet implements ResultController{

Expand All @@ -29,7 +27,6 @@ protected void doGet(HttpServletRequest req, HttpServletResponse res) throws Ser
public void reqProcess(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException{
String resultView = "";
try{
<<<<<<< HEAD
// 요청된 서블릿의 클래스 명을 받아온다.
Class c = Class.forName(super.getServletName());
// 그 클래스로 ResultController 클래스의 객체를 동적으로 생성
Expand All @@ -40,29 +37,13 @@ public void reqProcess(HttpServletRequest req, HttpServletResponse res) throws S
resultView = servlet.result(req, res);
}else{
// 오류시
=======
// 蹂羶脹 贗楚蝶曖 唳煎蒂 衙偃滲熱煎 嫡嬴 贗楚蝶 偌羹 儅撩
Class c = Class.forName(super.getServletName());
// 贗楚蝶煎 inteface 偌羹蒂 翕瞳戲煎 儅撩
ResultController servlet = (ResultController) c.newInstance();

if(servlet != null){
// 唸婁賊擊 褕橫遽棻.
resultView = servlet.result(req, res);
}else{
// 褒衛 URL 蛤幗梵辨
>>>>>>> bcd932d7b231f155ef36c372234bf32dabbb4c58
System.out.println(req.getServletPath());
}
}catch(Exception e){
e.printStackTrace();
}

<<<<<<< HEAD
// 오버로딩 된 Result 메소드의 결과 페이지를 Dispatcher 해준다.
=======
// 蹂羶脹 贗楚蝶曖 Overload脹 Result 熱縑憮 奩高檜 氈擊 唳辦 檜雖 錶註
>>>>>>> bcd932d7b231f155ef36c372234bf32dabbb4c58
if(resultView!=null){
RequestDispatcher rd = req.getRequestDispatcher(resultView);
rd.forward(req, res);
Expand Down
4 changes: 0 additions & 4 deletions src/com/controller/ResultController.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@
import javax.servlet.http.HttpServletResponse;

/**
<<<<<<< HEAD
* 구조를 통일시키기 위해 만든 인터페이스
=======
* ÆäÀÌÁö ¸®ÅÏ°ªÀ» ½±°Ô È®ÀÎÇÒ ¼ö ÀÖµµ·Ï ¸¸µé¾îÁØ interface
>>>>>>> bcd932d7b231f155ef36c372234bf32dabbb4c58
* @author EK
*/
public interface ResultController {
Expand Down
36 changes: 2 additions & 34 deletions src/com/db/dao/testDao.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,12 @@


import java.util.ArrayList;
<<<<<<< HEAD
import java.util.List;

import org.apache.ibatis.session.SqlSession;

import com.db.bean.TestBean;
=======

import org.apache.ibatis.session.SqlSession;

import com.db.bean.UserBean;
>>>>>>> bcd932d7b231f155ef36c372234bf32dabbb4c58
import com.db.settings.MybatisConnector;

public class testDao extends MybatisConnector{
Expand All @@ -25,48 +19,22 @@ public static testDao getInstance() {
}

/**
<<<<<<< HEAD
* user list 占쏙옙占쏙옙占쏙옙占쏙옙
* user list 가져오기
* @return
*/
public ArrayList<TestBean> getUserList(){
ArrayList<TestBean> list= new ArrayList<TestBean>();
=======
* user list 가져오기
* @return
*/
public ArrayList<UserBean> getUserList(){
ArrayList<UserBean> list= new ArrayList<UserBean>();
>>>>>>> bcd932d7b231f155ef36c372234bf32dabbb4c58

SqlSession session = getSqlSessionFactory().openSession();

try{
list = (ArrayList)session.selectList("mappers.test.selectUser");
<<<<<<< HEAD

=======
>>>>>>> bcd932d7b231f155ef36c372234bf32dabbb4c58
}finally{
session.close();
}

return list;
}
<<<<<<< HEAD

/**
* password占쏙옙 占쏙옙占쏙옙占싶쇽옙 占쏙옙咀억옙척占.
*/
/* public String getUserPass(){
String pass="";
try{
pass = (String) .......;
}finally{
}
return pass;
}*/
=======
>>>>>>> bcd932d7b231f155ef36c372234bf32dabbb4c58

}
3 changes: 0 additions & 3 deletions src/com/db/settings/MybatisConnector.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@ public class MybatisConnector {
static {
try{
String resource = "com/db/settings/MybatisSettings.xml";
<<<<<<< HEAD

=======
>>>>>>> bcd932d7b231f155ef36c372234bf32dabbb4c58
InputStream inputStream = Resources.getResourceAsStream(resource);

if(sqlSessionFactory ==null){
Expand Down

0 comments on commit b6eec14

Please sign in to comment.