Skip to content

Instantly share code, notes, and snippets.

@dwelch2344
Created May 17, 2015 03:43
Show Gist options
  • Save dwelch2344/37a4ded9f8751eab9c59 to your computer and use it in GitHub Desktop.
Save dwelch2344/37a4ded9f8751eab9c59 to your computer and use it in GitHub Desktop.
<%@ taglib prefix="tags" tagdir="/WEB-INF/tags" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<tags:template pageTitle="Application">
<jsp:attribute name="head">
I'm header content!
</jsp:attribute>
<jsp:attribute name="footer">
I'm footer content!
</jsp:attribute>
<jsp:body>
<body>
<h1>Hello world!</h1>
</body>
</jsp:body>
</tags:template>
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html>
<%@ taglib prefix="tags" tagdir="/WEB-INF/tags" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
<%@ attribute name="head" required="false" fragment="true" %>
<%@ attribute name="footer" required="false" fragment="true" %>
<%@ attribute name="pageTitle" required="false" fragment="false" %>
<html lang="en">
<head>
<title><c:if test="${not empty pageTitle}"><c:out value="${pageTitle}"/> - </c:if><c:out value="Zerorez"/></title>
<jsp:invoke fragment="head"/>
</head>
<jsp:doBody/>
<jsp:invoke fragment="footer"/>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment