Why don't you use Java Server Pages. In that you invoke your servlet file,
do the necessary database connection, retrieve data from database, populate
the dropdown lists and out put it as a HTML file. This ensures that your
data is always the latest in the selection lists.

I also had a similar situation, but there was some user authorisations to be
made, hence used the "submit" button to invoke the servlet.

To get more info on JSP here are a few sites

http://java.sun.com/products/jsp

http://www.esperanto.org.nz/jsp/

Would like to hear how you were able to accomplish it.



Regards and Happy Java Computing

Sivakumar S

*********************************
TNT Staffing
980 Kelly Johnson Dr
Las Vegas, NV
USA  89119.

Voice (702) 251 7181
Fax   (702) 896 7171
Mail  [EMAIL PROTECTED]
********************************







-----Original Message-----
From: A mailing list for discussion about Sun Microsystem's Java Servlet
API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of
Alison Lindores
Sent: Monday, December 27, 1999 10:19 PM
To: [EMAIL PROTECTED]
Subject: Starting a servlet when a web page loads


Hi,

Is there any way to make a servlet run as soon as a web page loads?

I have a search page where the user may select items from a number of drop
down lists. The list items are generated from a database query. The only
way I can see this working at the moment is if the user goes to the search
page and then has to click on a "START" button. The servlet then runs,
generates the lists and outputs a form into which the user may enter their
search criteria. But this not be an ideal interface for the user.

I would like the servlet to be invoked automatically, when the page is
loaded. Is this possible?

Alison Lindores
=============================================
3rd Year B Information Technology Student
Central Queensland University, Mackay Campus
Phone: (07) 4942 2627 or 0409 260 174
Email: [EMAIL PROTECTED]
=============================================

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to