| sitelink1 | |
|---|---|
| sitelink2 | |
| sitelink3 | |
| sitelink4 | |
| sitelink5 | |
| sitelink6 | 
출처 :: 네이버 블로그
클래스명 :: org.apache.velocity.tools.generic.DateTool
벨로시티에서 제공하는 툴들은 여러 종류가 있다.
GenericTools
VelocityView
VelocityStruts
이 있는데... 간단하게 GenericTools 에 있는 DateTool 을 사용해봤다.
http://jakarta.apache.org/velocity/tools/generic/
요기 GenericTools 를 볼 수 있당.
사용법은 무지 간단..
먼저 Tool 을 사용하기 위해.. toolbox.xml 을 WEB-INF/ 디렉토리에 생성하고,
VelocityViewServlet 에 해당 툴을 등록시켜주면 된다.
=============================================
<?xml version="1.0" encoding="UTF-8"?>
<toolbox>
<tool>
<key>date</key>
<scope>application</scope>
<class>org.apache.velocity.tools.generic.DateTool</class>
</tool>
</toolbox>
=============================================
web.xml 에서 VelocityViewServlet 에 init-param 으로 toolbox.xml 을 지정해 주어야 한다.
=============================================
<init-param>
<param-name>org.apache.velocity.toolbox</param-name>
<param-value>/WEB-INF/toolbox.xml</param-value>
</init-param>
=============================================
이렇게 적어주고... 해당 컨텍스트 리로딩..
마지막으로 test.vm 파일에 아래와 같이 적어준당..
=============================================
<BR><HR><BR>
$date.getDate()
<BR>
$date.format('yyyy-MM-dd aaa H:m:s', $date)
<BR>
$date.short || $date.medium || $date.long
<BR>
$date.get('yyyy-M-d H:m:s a')
=============================================
p.s ::
==========================================================================================
$date.getYear(), $date.getMonth(), $date.getDay() 의 또다른 방법
#set($currentYear=$date.getSystemCalendar().get(1))
#set($currentMonth=$date.getSystemCalendar().get(2)+1)
#set($currentDay=$date.getSystemCalendar().get(5))
==========================================================================================
			클래스명 :: org.apache.velocity.tools.generic.DateTool
벨로시티에서 제공하는 툴들은 여러 종류가 있다.
GenericTools
VelocityView
VelocityStruts
이 있는데... 간단하게 GenericTools 에 있는 DateTool 을 사용해봤다.
http://jakarta.apache.org/velocity/tools/generic/
요기 GenericTools 를 볼 수 있당.
사용법은 무지 간단..
먼저 Tool 을 사용하기 위해.. toolbox.xml 을 WEB-INF/ 디렉토리에 생성하고,
VelocityViewServlet 에 해당 툴을 등록시켜주면 된다.
=============================================
<?xml version="1.0" encoding="UTF-8"?>
<toolbox>
<tool>
<key>date</key>
<scope>application</scope>
<class>org.apache.velocity.tools.generic.DateTool</class>
</tool>
</toolbox>
=============================================
web.xml 에서 VelocityViewServlet 에 init-param 으로 toolbox.xml 을 지정해 주어야 한다.
=============================================
<init-param>
<param-name>org.apache.velocity.toolbox</param-name>
<param-value>/WEB-INF/toolbox.xml</param-value>
</init-param>
=============================================
이렇게 적어주고... 해당 컨텍스트 리로딩..
마지막으로 test.vm 파일에 아래와 같이 적어준당..
=============================================
<BR><HR><BR>
$date.getDate()
<BR>
$date.format('yyyy-MM-dd aaa H:m:s', $date)
<BR>
$date.short || $date.medium || $date.long
<BR>
$date.get('yyyy-M-d H:m:s a')
=============================================
p.s ::
==========================================================================================
$date.getYear(), $date.getMonth(), $date.getDay() 의 또다른 방법
#set($currentYear=$date.getSystemCalendar().get(1))
#set($currentMonth=$date.getSystemCalendar().get(2)+1)
#set($currentDay=$date.getSystemCalendar().get(5))
==========================================================================================
댓글 0
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 수 | 
|---|---|---|---|---|
| 66 | 서블릿의 생명주기   | 황제낙엽 | 2006.08.07 | 612 | 
| 65 | 서블릿의 초기화 | 황제낙엽 | 2006.07.24 | 547 | 
| 64 | JSTL | 황제낙엽 | 2006.02.17 | 721 | 
| 63 | J2SE 5.0 Tiger 에 관해서 | 황제낙엽 | 2006.02.16 | 541 | 
| 62 | Building an eBay Rich Client using the XUI Framework | 황제낙엽 | 2006.01.13 | 568 | 
| 61 | Vector 와 ArrayList의 차이 | 황제낙엽 | 2006.02.15 | 645 | 
| 60 | Using RSS in JSP pages (Informa Project) | 황제낙엽 | 2006.01.10 | 41700 | 
| 59 | 달력만들기 | 황제낙엽 | 2005.12.22 | 786 | 
| » | Velocity의 GenericTools 에 있는 DateTool | 황제낙엽 | 2005.12.21 | 586 | 
| 57 | StringTokenizer 예제소스 | 황제낙엽 | 2005.12.21 | 740 | 
| 56 | 유니코드로 된 파일 이름을 인터넷 익스플로러에서 저장하는 방법 | 황제낙엽 | 2005.12.01 | 701 | 
| 55 | Date 클래스와 Calendar 클래스 사이에... | 황제낙엽 | 2005.12.14 | 509 | 
| 54 | 한글처리2 | 황제낙엽 | 2005.12.01 | 573 | 
| 53 | 한글처리1 | 황제낙엽 | 2005.10.20 | 684 | 
| 52 | 유니코드 관련 유틸 클래스 | 황제낙엽 | 2005.07.16 | 789 | 
| 51 | 음력 계산 로직 | 황제낙엽 | 2005.07.16 | 583 | 
| 50 | 서블릿 내장 객체 (Implicit Object) | 황제낙엽 | 2004.11.12 | 626 | 
| 49 | java.text.SimpleDateFormat 클래스를 이용하여 java.util.Date 의 객체 생성시 초기화하기 | 황제낙엽 | 2004.10.03 | 759 | 
| 48 | 서블릿에서 페이지출력 | 황제낙엽 | 2004.09.30 | 531 | 
| 47 | Web Server Page작성시 한글처리를 위한 참고사항 (자바서비스넷 링크문서) | 황제낙엽 | 2004.05.27 | 706 | 
 
							