본문 바로가기

Ajax

(7)
MVC model2// 회원관리 index custuserlist CustUserController.java @WebServlet("/custcontroller") public class CustUserController extends HttpServlet { @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { String work = req.getParameter("work"); if(work.equals("move")) { forward("custuserlist.html", req, resp);// 거길루 가! } else if(work.equals("detail")) {..
MVC model2 // .html <- servlet .java접근 // gson// 화면에 뿌리기 index.html click HelloServlet.java @WebServlet("/hello") public class HelloServlet extends HttpServlet { @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { } @Override protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { /* * String str = "hello"; * * String gson = new G..
MVC model2 // .html <- servlet .java접근 //list//map//obj index.html Insert title here click CustUserServlet.jave @WebServlet("/custuser") public class CustUserServlet extends HttpServlet { @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { System.out.println("CustUserServlet doGet"); String id = req.getParameter("id"); String pwd = req.getParameter("pwd"); System.out.println("id: " +..
MVC model1 // .html <- .jsp 접근 index.html Insert title here click data.jsp
Html에서 $.ajax로 xml 파씽 index.html click data.xml naver http://www.naver.com 네이버 daum http://www.daum.net 다움 google http://www.google.co.kr 구글
Html 에서 $.ajax로 .json 호출 index.html click data.json [{ "name" : "홍길동", "age" : 24, "address" : "서울시", "phone" : "123" }, { "name" : "일지매", "age" : 21, "address" : "수원시", "phone" : "435" }, { "name" : "성춘향", "age" : 16, "address" : "화성시", "phone" : "890" }]
jsp load()로 <- .jsp호출 // Html $.ajax()로 <- .jsp호출 AJAX : Asynchronous JavaScript And Xml(Json) - 목적 : 비동기상태로 데이터의 송수신을 처리하는 목적을 가지고 있다 - a, form, location.href 는 모두 link로 이동시키는 태그로 synchronous 처리라고 해준다(동기적 처리) - JQuery 소속 index.jsp click data.html 사과 바나나 data.jsp t1 = t2 = ajax.html click