seevaa.net

  • 본문 바로가기
  • 블로그 내 검색
  • 글 분류 목록
  • 최근 글 목록
  • 기타 블로그메뉴
  • about
  • photolog
  • socialpage
  • taglog
  • guestbook
  • admin

Spring - ServletRequestUtils

from Application Programing/java/jsp 2011. 10. 10. 13:08 by seevaa Share on Twitter*

Spring 2.0

request로 부터 넘어온 파라미터의 형변환에 유용한 ServletRequestUtils 클래스,

int nowPage = 1;
if (request.getParameter("page") != null || !request.getParameter("page").equals("")){
	nowPage = Integer.parseInt(request.getParameter("page"));
}

위 코드를 아래와 같이 쓸 수 있다.

int nowPage = ServletRequestUtils.getIntParameter(request, "page", 1);

boolean, float, double, int, long, String 타입으로 받아 올 수 있으며 이 타입들의 배열([]) 타입으로도 바로 바인딩해서 넘겨 받을 수 있습니다.

source : http://whiteship.tistory.com/1005

'Application Programing > java/jsp' 카테고리의 다른 글

JSTL <functions>  (0) 2011.10.10
Spring - view를 결정하기  (1) 2011.04.22
java - ThreadLocal 클래스  (2) 2011.04.12
,

Categories

  • All (316)
    • Life Style (102)
    • Images (94)
      • Photo (94)
    • Web Standard (11)
      • HTML (0)
      • CSS (4)
      • JavaScript (7)
    • Application Programing (8)
      • java/jsp (8)
    • DataBase (5)
      • Oracle (3)
      • MySQL (0)
    • Programing Tool (2)
      • Eclipse (2)
    • Tistory (50)
      • Skin (22)
    • Fonts (12)
    • Bookmarks (31)

Recent Posts

Recent Comments

Recent Trackbacks

Archive

Links

  • http://wing91.tistory.com
  • http://xylosper.net
  • http://hanrss.co.kr
  • http://poty.cafe24.com
  • http://standardmag.org
  • http://www.raysoda.com/ess
  • http://startuu.net
  • http://cyoonk.com
  • http://trio.co.kr/webrefer/css…
  • http://designsen.net
  • http://tipography.tistory.com
  • http://twitter.com/seevaa_
  • http://tum.seevaa.net
  • http://clip.seevaa.net
subscribe to RSS

T Y T
subscribe to RSS, valid XHTML, CSS
Powered by , Designed by seevaa

  • 처음으로
  • 본문 바로가기
  • 블로그 내 검색
  • 글 분류 목록
  • 최근 글 목록
  • 기타 블로그메뉴
seevaa.net - Spring - ServletRequestUtils
작성자 : 쎄바(seevaa)
연락처 : seevaa@seevaa.net

티스토리툴바