거꾸로 토마토

고정 헤더 영역

글 제목

메뉴 레이어

거꾸로 토마토

메뉴 리스트

  • 홈
  • 태그
  • 미디어로그
  • 위치로그
  • 방명록
  • 분류 전체보기 (106)
    • 사는 이야기 (20)
    • 유용한 정보 (3)
    • 리눅스 & 유닉스 (6)
    • book (6)
    • Programming (50)
      • Android (1)
      • Database (16)
      • iBatis (4)
      • Spring Framework (10)
      • jQuery (1)
    • me2day (14)

검색 레이어

거꾸로 토마토

검색 영역

컨텐츠 검색

struts2

  • Struts 2. Action 객체에서 request, response 객체 사용하기

    2009.10.28 by otamot

  • struts 2. action 설정에서 result tag 사용

    2009.10.28 by otamot

  • Spring+struts2 환경에서 config에 action scope 정의 방법

    2009.10.21 by otamot

  • struts 2 설정 파일

    2009.10.21 by otamot

Struts 2. Action 객체에서 request, response 객체 사용하기

Action 객체 내에서 request 및 response 객체를 얻어오는 방법이다. public class UserAction extends ActionSupport { ... public String execute() { HttpServletRequest request = ServletActionContext.getRequest(); HttpServletResponse response = ServletActionContext.getResponse(); ... return SUCCESS; } } 일단 Action 객체는 ActionSupport 클래스를 상속한다. 그리고 객체 내에서 ServletActionContext 객체를 통해서 request와 response 객체를 얻어올 수 있다.

Programming/Spring Framework 2009. 10. 28. 15:25

struts 2. action 설정에서 result tag 사용

struts.xml에서 action을 등록하게 되는데 다음과 같다. /userRegi.jsp userListAction.do 태그가 다른형태의 두가지를 사용하고 있다. 첫번째 형태 /userRegi.jsp 는 바로 결과 페이지를 명시하는 것. executeGoto() 메소드를 수행 후 바로 userRegi.jsp로 이동하는 내용이다. 다음으로 userListAction.do 형태는 일단 속성 name과 type를 사용하고 있다. name은 action 함수에서 리턴하는 string을 명시하면된다. 리턴되는 string에따라 분기되는 방향을 명시하는 것이다. 다음으로 type 속성이 있는데 명시하는 이동 경로 이동하는 형태를 나타낸다. "chain"은 다른 액션으로 데이타와 같이 보낸다. 이 때 액션 이름..

Programming/Spring Framework 2009. 10. 28. 13:22

Spring+struts2 환경에서 config에 action scope 정의 방법

Spring + Struts2 를 통합해서 사용할 때 다른 bean들은 singleton으로 default 값을 정의해도 되나 action은 singleton으로 정의 하면 문제가 발생할 수 있다. 동시 사용자들이 사용할 경우 action 객체를 공유하게 되면 수행 결과가 엉뚱하게 나타날 수도 있는 문제가 발생한다. 위에서 scope 속성을 정의 했는데 default 값은 'singleton'이다. 이것을 prototype으로 정의하면 action수행 할 때마다 action 객체가 생성된다.

Programming/Spring Framework 2009. 10. 21. 15:00

struts 2 설정 파일

● struts.properties 설정 파일 struts.i18n.reload= true struts.devMode = false #configuration에서 설정된 모든 xml 다시 로딩해해서 무조건 처리해라. 실무에서는 사용 금지!! struts.configuration.xml.reload = true struts.continuations.package = org.apache.struts2.showcase strtus.custom.i18n.resources = globalMessages #was의 포트 번호, default는 80 struts.url.http.port = 9000 struts.action.extension=do #struts.freemarker.manager.classname = ..

Programming/Spring Framework 2009. 10. 21. 14:11

추가 정보

인기글

최신글

페이징

이전
1
다음
TISTORY
거꾸로 토마토 © Magazine Lab
페이스북 트위터 인스타그램 유투브 메일

티스토리툴바