Yes, it can be done. The trick is using jsp:include
for example, a jsp_open.jsp contains a dropdown list where the content of list is in a db
//code in jsp_open.jsp ..
// the following line call getSelection.jsp (it works just like calling a funtion)
<jsp:include page= "getSelection.jsp" flush="true" />
in getSelection.jsp
// some code to get a resultset rs
<SELECT name = country_name size = 1 width = 10>
<%
while (rs.next())
{
//out.println(rs.getString(1));
%>
<Option> <%= rs.getString(1) %> </option>
<%
}
%>
</Select>
Final resulte, the browser will display jsp_open.jsp with a dropdown list name contry_name.
-----Original Message-----
From: Orr, Geoffrey [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 11, 2000 9:43 AM
To: [EMAIL PROTECTED]
Subject: has anyone implemented dynamic drop down list boxes using JSP?
I know that I can generate my entire form using a servelet, with drop down
values populated
from the database, but is there anyway I can embed this sort of function in
a file system html
or jsp page?
I'm convincing myself that this can't be done, but can it? Has anyone
figured out any clever workarounds?
Thanks,
Geoff Orr
Application Systems Engineer 5
Pricing Engine Group
Norwest Mortgage Systems Development Group
Wells Fargo Service Company
301-846-8403 (6-8403)
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
