Minha dúvida é relacionada a boa prática no uso do cabeçalho, tirei os links e as taglibs das minhas páginas e coloquei todas no cabeçalho, assim tenho todos os dados que preciso sem precisar ficar reescrevendo, testei e funcionou tudo certo, mas a minha dúvida é, isso é bacana ou oferece algum problema?
o cabecalho.jsp ficou assim:
<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@ taglib uri="http://www.springframework.org/tags" prefix="s"%>
<%@ taglib uri="http://www.springframework.org/security/tags" prefix="security"%>
<head>
<c:url value="/" var="contextPath" />
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
<link rel="icon" href="//cdn.shopify.com/s/files/1/0155/7645/t/177/assets/favicon.ico?11981592617154272979" type="image/ico" />
<link href="https://plus.googlecom/108540024862647200608" rel="publisher" />
<title>Livros de Java, SOA, Android, iPhone, Ruby on Rails e muito mais - Casa do Código</title>
<c:url value="/resources/css/" var="cssPath" />
<link rel="stylesheet" href="${cssPath }bootstrap.min.css" />
<link rel="stylesheet" href="${cssPath }bootstrap-theme.min.css" />
<link href="${contextPath}resources/css/cssbase-min.css" rel="stylesheet" type="text/css" media="all" />
<link href='http://fonts.googleapis.com/css?family=Droid+Sans:400,700' rel='stylesheet' />
<link href="${contextPath}resources/css/fonts.css" rel="stylesheet" type="text/css" media="all" />
<link href="${contextPath}resources/css/fontello-ie7.css" rel="stylesheet" type="text/css" media="all" />
<link href="${contextPath}resources/css/fontello-embedded.css" rel="stylesheet" type="text/css" media="all" />
<link href="${contextPath}resources/css/fontello.css" rel="stylesheet" type="text/css" media="all" />
<link href="${contextPath}resources/css/style.css" rel="stylesheet" type="text/css" media="all" />
<link href="${contextPath}resources/css/layout-colors.css" rel="stylesheet" type="text/css" media="all" />
<link href="${contextPath}resources/css/responsive-style.css" rel="stylesheet" type="text/css" media="all" />
<link href="${contextPath}resources/css/guia-do-programador-style.css" rel="stylesheet" type="text/css" media="all" />
<link href="${contextPath}resources/css/produtos.css" rel="stylesheet" type="text/css" media="all" />
<link rel="canonical" href="http://www.casadocodigo.com.br/" />
<link href="${contextPath}resources/css/book-collection.css" rel="stylesheet" type="text/css" media="all" />
<style type="text/css">
body {
padding-bottom: 60px;
}
</style>
</head>
<nav class="navbar navbar-inverse">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed"
data-toggle="collapse" data-target="#bs-example-navbar-collapse-1"
aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span> <span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="${s:mvcUrl('HC#index').build() }">Casa do Código</a>
</div>
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<security:authorize access="hasRole('ROLE_ADMIN')">
<li>
<a href="${s:mvcUrl('PC#listar').build() }">Lista de Produtos</a>
</li>
<li>
<a href="${s:mvcUrl('PC#form').build() }">Cadastro de Produtos</a>
</li>
</security:authorize>
</ul>
<ul class="nav navbar-nav navbar-right">
<security:authorize access="isAuthenticated()">
<li><a href="${contextPath}carrinho" rel="nofollow">
Carrinho (${carrinhoCompras.quantidade })
</a></li>
<li><a href="#">
<security:authentication property="principal" var="usuario"/>
Usuário: ${usuario.nome }
</a></li>
<li>
<a href="${s:mvcUrl('LC#logout').build() }">Logout</a>
</li>
</security:authorize>
</ul>
</div>
</div>
</nav>
E qualquer outra .jsp ficou assim no início:
<!DOCTYPE html>
<html>
<%@include file="/WEB-INF/views/cabecalho.jsp" %>
...
O que me dizem?