I would like to pass the HTML page title to the included jsp page, but the title is passed to the view in the request attribute, which is hashMap dbTable
This works, but I don't like that I have Java mixed with my view
<%@ page import="java.util.HashMap" %>
<% HashMap dbTable = ((HashMap)request.getAttribute("dbTable")); %>
<jsp:include page="inc_header.jsp" flush="true">
<jsp:param name="pageTitle" value="<%= \"Confirm Delete \" + ((HashMap)request.getAttribute(\"dbTable\")).get(\"strTableTitle\") + \" Data \"%>" />
</jsp:include>
I only use jsp 1.2, so this does not work (the name just shows the EL instruction)
<jsp:include page="inc_header.jsp" flush="true">
<jsp:param name="pageTitle" value="Confirm Deletion of ${dbTable.strTableTitle} data" />
</jsp:include>
This works in the body of the page.
<h1>Confirm Deletion of <c:out value="${dbTable.strTableTitle}" /> Data </h1>
but it gives an inexhaustible string error
<jsp:include page="inc_header.jsp" flush="true">
<jsp:param name="pageTitle" value="Confirm Deletion of <c:out value="${dbTable.strTableTitle}" /> data" />
</jsp:include>
Any thought on how to make this cleaner? The header is used by all of my views, and I would like to create a final header line (e.g. Confirm DeleteHashMap.DatabaseTitle data) in each view template.