For some reason I'm experiencing a rather weird error. We use Spring MVC together with Tiles 2 to show our views. I have a configuration for our pages and a template:
Template:
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
<%@ taglib uri="http://www.springframework.org/tags" prefix="s" %>
<html>
<head>
<title><s:message code="application.title"/></title>
<!-- CSS declarations -->
<link href="${pageContext.request.contextPath}/stylesheets/compass.css" type="text/css" rel="stylesheet"/>
<link href="${pageContext.request.contextPath}/stylesheets/niftyCorners.css" rel="stylesheet" type="text/css" />
<%-- JS imports (prototype used for $('elementID'). $ replaces document.getElementById() --%>
<script src="${pageContext.request.contextPath}/javascript/prototype.js" type="text/javascript"></script>
<script src="${pageContext.request.contextPath}/javascript/scriptaculous.js" type="text/javascript"></script>
<script src="${pageContext.request.contextPath}/javascript/niftycube.js" type="text/javascript"></script>
</head>
<body>
<tiles:insertAttribute name="header" />
<tiles:insertAttribute name="menu" />
<tiles:insertAttribute name="footer" />
</body>
</html>
Configuration:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE tiles-definitions PUBLIC
"-//Apache Software Foundation//DTD Tiles Configuration 2.0//EN"
"http://tiles.apache.org/dtds/tiles-config_2_0.dtd">
<tiles-definitions>
<!-- DEFAULT MAIN TEMPLATE -->
<definition name="template" template="/WEB-INF/jsp/template/template.jsp">
<put-attribute name="header" value="/WEB-INF/jsp/header.jsp" />
<put-attribute name="menu" value="/WEB-INF/jsp/menu.jsp" />
<put-attribute name="footer" value="/WEB-INF/jsp/footer.jsp" />
</definition>
<!-- Pages -->
<definition name="welcome" extends="template">
</definition>
</tiles-definitions>
The problem is, in menu.jsp I can't use c:set at all. When I add that, the content which is beneath the c:set var in that tile isn't rendered at all. The content above the tag "c:set var" is rendered twice.
For instance, when I add this content to the menu.jsp:
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
TESTING 1
<c:set var="language" value="${pageContext.response.locale.language}" />
I can see TESTING 1. When I add the "TESTING 1" underneath the c:set-tag, I can't see anything. When I add TESTING 2 underneath the c:set-tag and leave TESTING 1 above the tag, TESTING 1 is shown twice.
Does anyone have any idea what the problem could be? To be honest, I really have no idea what the problem could be.
Edited by: Bjorn130 on Oct 9, 2008 6:39 AM