wrote:
> I am new to JSPs and am actually a core java programmer. I have a
> problem. I have different jsp files and all these jsp files should be
> including a header.jsp. I want to display different title in this
> header.jsp for each of the above files, I mentioned. The way I thought
> was that I'll have a variable called pageTitle in all the above jsp
> files and access this variable in header.jsp. But I am not successful
> uptil now.
page.jsp
<%
String pagename = "example page";
%>
<%@ include file="hdr.jsp" %>
Bla bla bla
hdr.jsp
I am <%=pagename%>.
<hr>
works here.
I do not believe that you can do it with the jsp:include
tag.
And in general I think you are on the wrong track - this is
not the JSP way of doing things.
Arne