How do I integrate Sitemesh 3 with Spring MVC 3?

前端 未结 3 1513
傲寒
傲寒 2021-01-13 23:56

I am trying to use Sitemesh 3 to control the decoration of JSP output from a Spring MVC application.

When I hit the application it seems that Sitemesh is making a re

3条回答
  •  不要未来只要你来
    2021-01-14 00:36

    Since no one has posted actual content, here you go:

    in pom.xml add:

    
        org.sitemesh
        sitemesh
        3.0.0
    
    

    in WEB-INF/web.xml † add:

    
        sitemesh
        org.sitemesh.config.ConfigurableSiteMeshFilter
    
    
    
        sitemesh
        /*
    
    

    in WEB-INF/sitemesh3.xml add:

    
        
    
    

    in WEB-INF/decorator1.jsp add:

    
        
        ...
        
        
            
        
    
    

    † put this below your Spring Security Filter Chain if using Spring Security.

提交回复
热议问题