问题
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