나는 바보 같은 질문 일지 모르지만 나는 opencms에서 jsp 템플릿을 이해하려고 애쓰다.OpenCms 태그의 OpenCms 태그
jsp에는 htm 태그가 있지만
<cms:template element="body">
<cms:include element="body" />
당신이 CMS를 태그 CMS를 통해 JSP 파일에서 템플릿 부품을 정의 할 수 있습니다
page이 위키에 설명 된 바와 같이
나는 바보 같은 질문 일지 모르지만 나는 opencms에서 jsp 템플릿을 이해하려고 애쓰다.OpenCms 태그의 OpenCms 태그
jsp에는 htm 태그가 있지만
<cms:template element="body">
<cms:include element="body" />
당신이 CMS를 태그 CMS를 통해 JSP 파일에서 템플릿 부품을 정의 할 수 있습니다
page이 위키에 설명 된 바와 같이
: 같은 CMS를 태그의 실제 사용 무엇 템플릿을 다음이에 포함하여 CMS를 태그 CMS를 통해 JSP 페이지 :
CMS를 포함 : 템플릿 태그 태그
을, 당신은 여러 페이지를 처리 할 수 있도록 템플릿에 제어 구조를 추가 할 수 있습니다 요소.
CMS는 :이 태그는 동적으로 런타임에 OpenCms VFS에서 파일을 포함하는 데 사용되는 태그를
을 포함한다. 포함 된 파일은 선택적인 추가 요청 매개 변수가있는 요청처럼 처리됩니다. 다음과 같은 속성 중 하나를 사용하여 포함 된 파일의 이름을 결정하기 위해 다른 옵션이 있습니다 : 를 - 페이지 - 부동산 - 속성이 속성의 아무것도 설정되어 있지 않은 경우
가, 태그의 몸이 평가
은 결과는 파일 이름으로 사용됩니다.<%@ page session="false" %>
<%@ taglib prefix="cms" uri="http://www.opencms.org/taglib/cms" %>
<cms:template element="head">
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title><cms:property name="title" escapeHtml="true" /></title>
<meta HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; CHARSET=<cms:property name="content-encoding" default="ISO-8859-1" />">
<link type="text/css" rel="stylesheet" href="<cms:link>../resources/mystyle.css</cms:link>">
<cms:editable />
</head>
<body>
<h2>My first template head</h2>
<!-- Main page body starts here -->
</cms:template>
<cms:template element="body">
<h2>This is the first page element:</h2>
<cms:include element="body" editable="true"/>
<cms:template ifexists="body2">
<h2>This is the second page element:</h2>
<cms:include element="body2" editable= "true"/>
</cms:template>
</cms:template>
<cms:template element="foot">
<!-- Main page body ends here -->
<h2>My first template foot</h2>
</body>
</html>
</cms:template>