How do I get data to the included jsp file?

How do I pass information into a jsp page that has been included? I have a record set and need to pass the recordset into a page that I am including on the page. It appears that using the

RecordSet pageRecordSet = results;

<jsp:include page="resultItem.jsp">

<jsp:param name="pageRecordSet" value="<%= pageRecordSet %>" />

</jsp:include>

only allows the passing over of a literal value and not anything else. What must I do to pass over more complex data, objects, recordSets, etc.?

[621 byte] By [psu99a] at [2007-11-26 15:14:52]
# 1

i see this suggestion from

http://www.experts-exchange.com/Web/Web_Languages/JSP/Q_21255895.html

--

You can declare a Resultset/(Bean-having getters & setters) reference in the main JSP page.

This reference can be accessed in the including JSP page if you use

<%@include file="" />

Populate the details in the include page.

Now you can use the object(having the details populated) in the main jsp page.

When u use <jsp:include.... the page will be included during runtime.

So the variables in the main jsp page cannot be accessed in the included file.

Also you need to initialize the reference variable to 'null'/default vaue.

i hope i helped u! :)>

leoncinaa at 2007-7-8 9:06:24 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
Yeah, thats what I was afraid of. Its been about 2 years since I have done any real development work and I thought that I may have to use a bean for this.Thanks for the reference.
psu99a at 2007-7-8 9:06:24 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3
You could send the objects as request or session attributes.
tolmanka at 2007-7-8 9:06:24 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...