struts2 app에 sitemesh를 통합하려고합니다. 그러나 어떤 차이도 보이지 않으며 로그에 오류나 sitemesh와 관련된 내용이 전혀 표시되지 않습니다. .struts2와 함께 작동하도록 sitemesh를 얻으려면
나는 sitemesh 사이트의 모든 문서를 따라 가면서 시작 했으므로 운이 없었으므로 이제 sitemesh 예제 다운로드에서 수행 된 내용을 아무런 노력없이 복사하려고합니다. 어떤 아이디어라도 좋을 것입니다.
WEB-INF/web.xml을 :
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<display-name>Sample</display-name>
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<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>
</web-app>
WEB-INF/decorators.xml :
<?xml version="1.0" encoding="UTF-8"?>
<decorators defaultdir="/decorators">
<decorator name="main" page="main.jsp">
<pattern>*</pattern>
</decorator>
</decorators>
WEB-INF/lib 폴더 :
sitemesh-2.4.2.jar
sitemesh-decorator.tld
sitemesh-page.tld
장식/main.jsp :
<%@ taglib uri="http://www.opensymphony.com/sitemesh/decorator" prefix="decorator" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>
My Site - <decorator:title default="Welcome!" />
</title>
<decorator:head />
</head>
<body>
<h1><decorator:title default="Welcome!" /></h1>
<p><decorator:body /></p>
<p><small>
(<a
href="?printable=true">printable version</a>)
</small></p>
</body>
</html>
,363,210
고마워
디렉토리 구조를 제공 할 수 있습니까? –