<?xml version="1.0" encoding="UTF-8"?>
<xml-body>
<decorators defaultdir="/decorators">
<decorator name="main" page="main.jsp">
<pattern>/w*</pattern>
</decorator>
</decorators>
<decorator name="sidebar" page="sidebar.jsp" />
</xml-body>
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"> <filter>
<filter-name>sitemesh</filter-name>
<filter-class>
com.opensymphony.module.sitemesh.filter.PageFilter
</filter-class>
</filter>
<filter-mapping>
<filter-name>sitemesh</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping> <welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list></web-app>
文件放置大概图
webroot
 |-decorators
  |-main.jsp
  |-sidebar.jsp
 |-webindex
  |-index.jsp
 |-web-info
  |-decorators.xml
  |-web.xml
 -index.jsphttp://localhost:8088/Decorate/webindex/index.jsp Path main.jsp does not start with a "/" character
这个原因主要是怎么产生 的  ,请详细说明一下 谢谢了

解决方案 »

  1.   

    main.jsp 或者引用main.jsp  的路径是怎么写的
      

  2.   

    <?xml version="1.0" encoding="UTF-8"?>
    <xml-body>    <decorators defaultdir="/decorators">
            <decorator name="main" page="main.jsp">
                <pattern>/w*</pattern>
            </decorator>
        </decorators>
        <decorator name="sidebar" page="sidebar.jsp" />
    </xml-body>
    我找到错误的地方了
    这个不知道是怎么冒出来的,害的我快找死
      

  3.   

    </xml-body>