Notice
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 31 |
Tags
- Log4j
- 메모
- iBATIS
- Modeling
- Oracle
- java se
- 안드로이드
- 오라클
- 오류
- 관심책
- Android
- eclipse plugin
- TDD
- annotation
- 우분투
- ERD
- junit
- TAG 오류
- 초대장
- derby
- java
- 실수
- eclipse
- action
- Spring Framework
- 디자인 오류
- struts2
- Spring
- DATABASE
- 초대장 배포
- Today
- 0
- Total
- 579,107
목록action (2)
거꾸로 토마토
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
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