| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | ||||||
| 2 | 3 | 4 | 5 | 6 | 7 | 8 |
| 9 | 10 | 11 | 12 | 13 | 14 | 15 |
| 16 | 17 | 18 | 19 | 20 | 21 | 22 |
| 23 | 24 | 25 | 26 | 27 | 28 | 29 |
| 30 |
- struts2
- 국제화
- 오버로딩
- JSP
- mybatis
- Eclips
- HTML
- 안드로이드
- paint
- 어노테이션
- 전화걸기
- 메서드
- Menu
- 메소드
- layout
- 이클립스
- Graphic
- AWT
- Android
- OGNL
- 클래스
- 에러페이지
- oracle
- 배열
- 생성자
- Java
- Spring
- JavaScript
- 기본
- 예외처리
- Today
- Total
목록JSP (119)
note
실행시 콘솔창 struts-ch5.xml /ch4/hello.jsp createSuccess.jsp com.ch5.interceptor/UserDaoAwarepackage com.ch5.interceptor; import com.ch4.dao.UserDao; public interface UserDaoAware { public void setUserDao(UserDao userDao); } com.ch5.interceptor/UserDaoInterceptorpackage com.ch5.interceptor; import com.ch4.dao.UserDao; import com.opensymphony.xwork2.ActionInvocation; import com.opensymphony.xwork2.int..
struts-ch5.xml /ch4/hello.jsp struts.xml TimerInterceptor.javapackage com.ch5.interceptor; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import com.opensymphony.xwork2.ActionInvocation; import com.opensymphony.xwork2.interceptor.AbstractInterceptor; public class TimerInterceptor extends AbstractInterceptor{ private static Log log = LogFactory.getLog(TimerIn..
이전 게시물과 연관 [JSP/스트럿츠2] - struts2 ActionSupport를 이용한 JSP 호출 (form만 요청할페이지에 사용) [JSP/스트럿츠2] - struts2 default-action-ref (에러페이지) [JSP/스트럿츠2] - Struts2 와일드카드 디폴트 [JSP/스트럿츠2] - Struts2 include 사용 [JSP/스트럿츠2] - Struts2 유효성 검사 [JSP/스트럿츠2] - Struts2 ActionSupport를 사용하여 유효성 검사 struts-ch4.xml hello.jsp name4.jsp hello.jsp name5.jsp hello.jsp createSuccess.jsp userForm.jsp 이름 : 나이 : 이메일 : createSuccess.js..
extends ActionSupport를 해준뒤에 Override 및 Implements 자동완성으로 넣기 struts-ch4.xml hello.jsp name4.jsp hello.jsp name5.jsp hello.jsp HelloWorld5.javapackage com.ch4.action; import com.opensymphony.xwork2.ActionSupport; public class HelloWorld5 extends ActionSupport{ private String name; private String message; @Override public void validate() { if(name == null || "".equals(name) || "World".equals(name))..
struts-ch4.xml hello.jsp name4.jsp hello.jsp name4.jsp ${message} HelloWorld4.java package com.ch4.action; import com.opensymphony.xwork2.Action; public class HelloWorld4 implements Action{ private String message; private String name; @Override public String execute() throws Exception { //유효성 검사 if(name == null || "".equals(name) || "World".equals(name)){ message = "이름이 없거나 'World'라는 이름을 쓸 수 없습니..
struts.xml struts-ch4.xml hello.jsp HelloWorld3.javapackage com.ch4.action; import com.opensymphony.xwork2.Action; public class HelloWorld3 implements Action{ private String message; private String name; //getMessage()역할은 request.setAttribute("message",message) public String getMessage() { return message; } //setName() 역할은 request.getParameter("name"); public void setName(String name) { this.nam..
struts.xml {1}.jsp a.jsp 와일드카드 디폴트를 이용해서 JSP 호출 *은 모든 단어를 의미함 단점 모든 요청을 다 흡수함 사용하려면 맨 밑에다 사용 (자주 사용하지 않는 방법임) (가급적이면 사용하지 않는것이 좋습니다)
struts.xml /some.jsp some.jsp 요청한 페이지를 찾을 수 없습니다. 존재하지 않는 페이지에 대한 처리
struts.xml hello.jsp aa 액션이 없어도 JSP 호출할 수 있습니다 Action페이지에 내용이 없을 경우에 사용하면 편리함
파일 위치 struts.xml /helloWorld02.jsp HelloWorld02.java package tutorial; public class HelloWorld02 { private String message; //getMessage()역할은 request.setAttribute("message",message); public String getMessage(){ return message; } public String execute() throws Exception{ message = "POJO 형태의 액션 만들기"; return "success"; } } helloWorld02.jsp ${message} implements Action이 없으면 강요되는 부분이 없어서 에러날 확률이 있다 그냥..
2.0.14 백업 http://struts.apache.org 기본 설정 프로젝트 생성 생성됨 쓸모 없는 파일들 지우기 필수 요소 web.xml Struts2Main struts2 org.apache.struts2.dispatcher.FilterDispatcher struts.i18n.encoding utf-8 struts2 /* index.html package -> tutorial class -> HelloWorld 기본 동작 확인을 위한 생성 HelloWorld.java package tutorial; import com.opensymphony.xwork2.Action; public class HelloWorld implements Action{ private String message; publi..
package com.util; import java.io.IOException; import java.io.Reader; import java.sql.ResultSet; import java.sql.SQLException; public class StringUtil { public static String clobToString(ResultSet rs, String msg) throws SQLException, IOException { StringBuffer sb = new StringBuffer(); Reader rd = rs.getCharacterStream(msg); char[] buffer = new char[1024]; int byteRead; while ((byteRead = rd.read(..
예제 제목 이름 내용 전체 글:${page.count} 글쓰기 게시판에 저장된 글이 없습니다. 번 호 제 목 작성자 작성일 조 회 IP ${number} ${article.subject} ${article.writer} ${article.reg_date} ${article.readcount} ${article.ip} [이전] [${i}] [${i}] [다음]
패턴 mvc2Main2 dr.mini.controller Action Controller dr.mini.action InsertFormAction dr.mini.dao MemberDao dr.mini.domain Member WebContent view insertForm.jsp META-INF context.xml META-INF commandMap.properties 자바빈 구성 DAO 생성 InsertFormAction commandMap.properties web.xml commandMap.properties/insertForm.do=dr.mini.action.InsertFormAction /insert.do=dr.mini.action.InsertAction /selectList.do=dr.min..
Servlet 실행 -> 모든 모델 실행뒤 -> request에 담아지고 JSP ->가 request파일 호출 web.xml mvcMain SimpleController kame.chap24.SimpleController SimpleController /simple index.html index.htm index.jsp default.html default.htm default.jsp SimpleController.java package kame.chap24; import java.io.IOException; import javax.servlet.RequestDispatcher; import javax.servlet.ServletException; import javax.servlet.http.HttpS..