new Ajax.Request
'자바스크립트' 카테고리의 다른 글
구글 맵 API (0) | 2013.07.17 |
---|---|
Tistory 블러그 복사하는 방법 (0) | 2013.07.01 |
[JS api] AjaxUpload 사용하기 (0) | 2013.06.13 |
자바스크립트에서 미디어쿼리 처럼 CSS 사용하기 (0) | 2013.04.02 |
웹표준, 웹접근성 및 Tree 구현 (0) | 2013.04.02 |
new Ajax.Request
구글 맵 API (0) | 2013.07.17 |
---|---|
Tistory 블러그 복사하는 방법 (0) | 2013.07.01 |
[JS api] AjaxUpload 사용하기 (0) | 2013.06.13 |
자바스크립트에서 미디어쿼리 처럼 CSS 사용하기 (0) | 2013.04.02 |
웹표준, 웹접근성 및 Tree 구현 (0) | 2013.04.02 |
네이버 : "sitemesh(사이트메쉬) 해보기" 검색하면 나옴
http://cafe.naver.com/buldon/2005
1. jar파일 다운로드 ( http://opensymphony.com/ 프로젝트 임 )
http://www.sitemesh.org/ - > download ( sitemesh-버전.jar , 최신 2.4.2 )
2. web.xml 설정 추가
<!-- Sitemesh Configration -->
<filter>
<filter-name>sitemesh</filter-name>
<filter-class>com.opensymphony.sitemesh.webapp.SiteMeshFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>sitemesh</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
3. /WEB-INF/decorators.xml 설정
<?xml version="1.0" encoding="UTF-8"?>
<decorators defaultdir="/decorators">
<decorator name="basic-theme" page="basic-theme.jsp">
<pattern>/data/*</pattern>
</decorator>
</decorators>
4. basic-theme.jsp 파일
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Café Mirabeau</title>
</head>
<body>
<h1>Header</h1>
<p><b>Navigation</b></p>
<hr />
<decorator:body />
<hr />
<h1>Footer</h1>
</body>
</html>
5. /data/hour.jsp ( 화면에 보일때는 basic-theme.jsp 안에 hour.jsp파일의 body가 자동으로 들어가서 보인다 )
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Hours</title>
</head>
<body>
<h1>Weekdays</h1>
<p>5:00pm - 10:00pm</p>
<p>Weekends</p>
<p>5:00pm - 10:00pm</p>
</body>
</html>
sitemesh에서 제공하는 파일 cafe.war
[ibatis] 여러개 resultMap 과 groupBy 사용 예제 (0) | 2013.08.22 |
---|---|
[ibatis] map 으로 파라미터 받기 (0) | 2013.07.15 |
[POI] RecordFormatException: Unable to construct record instance 오류 (0) | 2013.07.02 |
[POI] Excel 읽고 쓰기 (0) | 2013.07.02 |
[ibatis] in 처리 (0) | 2013.06.17 |
1. ~.tld 파일 설정
기본적으로 web.xml 에 taglib 를 등록하지만 WEB-INF/ 밑에 ~.tld 파일이 있을 경우 따로 설정하지 않아도 된다.
JSP에서는 tld파일의 taglib 태그의 uri 태그 값으로 불러와서 사용하면 됨
예) tld파일 : WEB-INF/ 밑에 있어야함
tld파일안에 : <uri>net.ucware.tags</uri>
jsp : <%@ taglib prefix="ast" uri="net.ucware.tags" %>
2. 커스텀 태그 정리 중....
HearderTag.java
public class DefaultConfigTag extends TagSupport {
private String var;
public void setVar(String var) {
this.var = var;
}
public int doStartTag() throws JspException {
String value = "aaa";
pageContext.setAttribute(var, value);
아니면
JspWriter out = pageContext.getOut();
ou.print("aaa");
return SKIP_BODY;
}
}
<exam:mutiply op1="2" start="1" end="9" >
</exam>
<exam:mutiply op1="2" start="1" end="9" >
${pageContext.op1} * ${pageContext.op2} = ${pageContext.op1 * pageContext.op2} <br> <=== 몸체라고함
</exam:multiply>
Return 값 종류
doStartTag()
SKIP_BODY : 몸체 내용을 처리하지 않는다
EVAL_BODY_INCLUDE : 몸체 내용을 처리한 결과를 출력한다.
doAfterBody()
EVAL_BODY_AGAIN 이면 몸체 다시 실행 do{ }while(조건) 처럼
SKIP_BODY : 몸체 내용을 처리하지 않는다
유용한 크롬 확장프로그램 (0) | 2013.12.05 |
---|---|
[jstl] fmt:message , ResourceBundle, 국제화 태그 , 로케일 (0) | 2013.06.27 |
[펌] JSP 버전 확인 방법 (0) | 2013.06.19 |
<fmt: bundle>태그와 <fmt:message>태그 등 (0) | 2013.06.05 |
[펌] <jsp:include page=...>과 <@include file=...>의 차이 (0) | 2013.04.29 |