풀스택/jQuery
jqery 활용 mysite2에 적용시키기 -보충
woohyun22
2019. 2. 14. 19:40
복습겸 순서정리
- 네비게이션에서 연결 action ajax로
1 | <li><a href="${pageContext.servletContext.contextPath }/guestbook?a=ajax">방명록(Ajax)</a></li> | cs |
- actionfactory
1 2 3 | else if("ajax".equals(actionName)) { action = new AjaxAction(); } | cs |
- ajaxaction
1 2 3 4 5 6 7 8 | public class AjaxAction implements Action { @Override public void execute(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { WebUtils.forward(request, response, "/WEB-INF/views/guestbook/index-ajax.jsp"); } } | cs |
- index-ajax.jsp로
1 2 3 4 5 | <link rel="stylesheet" href="${pageContext.request.contextPath }/assets/css/guestbook-ajax.css" rel="stylesheet" type="text/css"> <link rel="stylesheet" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css"> | cs |
- guestbook-ajax.css를 읽어옴
-보충하기
728x90