How to load particular page without JSP include prelude and coda

青春壹個敷衍的年華 提交于 2021-02-11 06:52:09

问题


I have set up my web.xml file which loads footer and header but I want to separate my login page to load it without header footer. Does any know how can I achieve this.

Here is my Web.xml file configuration. I am using Netbeans

 <jsp-config>
    <jsp-property-group>
        <description>JSP configuration for the store front</description>
        <url-pattern>/index.jsp</url-pattern>
        <url-pattern>/WEB-INF/view/*</url-pattern>
        <url-pattern>/WEB-INF/jspf/error/*</url-pattern>
        <include-prelude>/WEB-INF/jspf/header.jspf</include-prelude>
        <include-coda>/WEB-INF/jspf/footer.jspf</include-coda>
    </jsp-property-group>
    <jsp-property-group>
        <description>JSP configuration for the admin console</description>
        <url-pattern>/admin/index.jsp</url-pattern>
        <url-pattern>/admin/login.jsp</url-pattern>
        <url-pattern>/admin/error.jsp</url-pattern>
        <include-prelude>/admin/jspf/header.jspf</include-prelude>
        <include-coda>/admin/jspf/footer.jspf</include-coda>
    </jsp-property-group>
</jsp-config>

回答1:


Create one new group without include-prelude and include-coda

<jsp-property-group>
    <display-name>Login</display-name>
    <url-pattern>/login/*</url-pattern>
    </jsp-property-group>
</jsp-config>


来源:https://stackoverflow.com/questions/13610147/how-to-load-particular-page-without-jsp-include-prelude-and-coda

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!