struts2+sitemesh 装饰器action路径问题

[size=xx-large][size=large] [/size][size=small] 定义了三个装饰器模板stu_Decorator.jsp, tec_Decorator.jsp, admin_Decorator.jsp。有三个action之后的页面分别被装饰 student.jsp, teacher.jsp, admin.jsp. 但是无论action到哪个页面都被admin_Decorator.jsp 装饰。下面是decorator.xml代码:

<?xml version="1.0" encoding="UTF-8"?>
<decorators defaultdir="/decorators">
  <excludes>
  <pattern>/index.jsp</pattern>  
  </excludes>
   
<decorator name="stu_Decorator" page="stu_Decorator.jsp">
<pattern>/student/*</pattern>  
  <pattern>/*.action</pattern>  
</decorator>  
   

   
  <decorator name="tec_Decorator" page="tec_Decorator.jsp">
<pattern>/teacher/*</pattern>  
  <pattern>/*.action</pattern>  
  </decorator>
   
   
   
  <decorator name="admin_Decorator" page="admin_Decorator.jsp">
<pattern>/admin/*</pattern>  
  <pattern>/*.action</pattern>  
  </decorator>
   
</decorators>

······················
怎样让action后的页面被各自的装饰器正确装饰???
即stu_Decorator.jsp装饰student.jsp
tec_Decorator.jsp 装饰 teacher.jsp
  admin_Decorator.jsp 装饰 admin.jsp

[size=x-small]
[/size][size=medium][/size][/size][/size]

你可能感兴趣的:(struts)