Hello to the list,
I have to build a jsp page A depending on the result of a query. I managed
to do it
easily but I have a problem that I cannot solve:
this dinamically built page A calls a page B.
THis page B is supposed to:
. instantiate the proper beans
. pass the data to them
. manage the flow
now, I have to instantiate only the bean that I need, (example, if the page
A has two included pages A.1 and A.3
I have to instantiate the beans a_1 and a_3.
I put an hidden field in the pages A.1 and A.3 that helps me to find out
they are present
and i did like this:
-- JSP page B --
<%
if ( request.getParameter("a.1_present").Equals("Y") {
%>
<jsp:useBean id="a_1" class="...
<jsp:setProperty...
<%
...
}
%>
a_1.validate()...
but when below I use the bean it gives an error "bean a_1 not
existing"...like it was not instantiated
What I am doing wrong? Is there an alternative (better) way to do it?
many thanks
MQ
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets