Struts2-Sitemesh有关

Struts2---Sitemesh相关
看一个简单的sitemesh装饰模板页面
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="decorator" uri="/WEB-INF/sitemesh-decorator.tld"%> 
<%@taglib prefix="s" uri="/WEB-INF/struts-tags.tld" %>
<html>
    <head>  
        <title><decorator:title default="struts-nb"/></title>
        <script type="text/javascript" src="<s:url value='/scripts/ext-all.js 'encode='false' includeParams='none'/>" ></script>
        <script type="text/javascript" src="<s:url value='/scripts/bootstrap.js 'encode='false' includeParams='none'/>"></script>
        <link rel="stylesheet" type="text/css" href="<s:url value='/shared/example.css'encode='false' includeParams='none'/>" />   
        <link rel="stylesheet" type="text/css" href="<s:url value='/styles/ext-all.css' encode='false' includeParams='none'/>" />
        <decorator:head/>
    </head>
    <body>
        <p>This page has been decorator</p>
        <div><decorator:body/></div>
    </body>
</html>


注意<decorator:head/>的位置,应该放在script 和 css 下面,不然javascript引用可能产生错误