Hi all,
JSP newbie here. How am I supposed to create dynamic html page titles with JSP. I'm using page includes for my header/footer and would like to create a variable for my page title that would be different in each page.
So for my main content pages you would have something like
maincontent.jsp
<jsp:include page="includes/blocks/header.jsp" flush="true"/>
String pageTitle = "This is a page title";
this is where my main content would go.
<jsp:include page="includes/blocks/footer.jsp" flush="true"/>
and then in header.jsp
I would have to have something that calls the title variable
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title> out.println(pageTitle) </title>
HOWEVER the above does not work. Does anyone know how to do this
Thanks in advance