<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.2802" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=417040020-28022006><FONT face=Arial size=2>I have a JSP
template which uses <cms:include> to include a couple of other JSP page
elements (header and footer, predictably enough). I create an object or
two in the header which I need to use in the page body and in the footer, but at
the moment I'm struggling to see how I can share the object
reference:</FONT></SPAN></DIV>
<DIV><SPAN class=417040020-28022006><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=417040020-28022006><FONT face=Arial size=2>1. Putting it
into the page context, either via Java (pageContext.setAttribute()) or via
<jsp:useBean>, doesn't seem to work - I guess this is because the
'include' is dynamic and we're dealing with different Java
scopes.</FONT></SPAN></DIV>
<DIV><SPAN class=417040020-28022006><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=417040020-28022006><FONT face=Arial size=2>2. Same with the
request context, again because the include is dynamic. OpenCms
documentation suggests that you can set request parameters before executing the
include, but from the taglib only String setting is possible - and I want
to share a reference to something other than a String.</FONT></SPAN></DIV>
<DIV><SPAN class=417040020-28022006><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=417040020-28022006><FONT face=Arial size=2>3. Putting it
into session context is (i) a pity, because otherwise I don't need to set up
sessions and maintain session state, and (ii) not really appropriate, because in
theory the same client could make two requests so quickly that two JSP-serving
threads would hit the same session state. I realise there are ways round
(ii), but I'd rather not go there if there's an easier
solution.</FONT></SPAN></DIV>
<DIV><SPAN class=417040020-28022006><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=417040020-28022006><FONT face=Arial size=2>Any ideas
welcomed. I would really love to get on with some coding and stop having
to wrestle with the execution environment like this!</FONT></SPAN></DIV>
<DIV><SPAN class=417040020-28022006><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=417040020-28022006><FONT face=Arial
size=2>Jon</FONT></SPAN></DIV>
<DIV><SPAN class=417040020-28022006><FONT face=Arial
size=2></FONT></SPAN> </DIV></BODY></HTML>