>>> Lalith Jayaweera <[EMAIL PROTECTED]> 9/19/99 8:35:55 AM >>>
>And most importantly, this task has to be done only using a single
screen
>which is quite natural(basically what it does is select a dept then
lecturer
>belongs to selected dept and then fill his/her details in the other
test
>fields)without
>submitting many screens.
On the face of it this can't be done using servlets.
Since a servlet needs to recieve a submit from the browser before it
can do anything and you are very specific about not doing this then
you're stuck.
You could of course send the entrie database to the page when it is
requested, but this is probably a little OTT.
But there is another way...
What you could do is have 2 frames.
Frame 1 contains the combo with choice of department and it's target
would be Frame 2.
Some VERY simple JavaScript could handle doing an auto submit
whenever a value was selected in the combo box in Frame 1. The action
would be the servlet of course, which would do your database lookup
based on the department info.
Frame 2 would then be populated with a servlet produced page which it
had the second combo in it.
This may sound quite a nasty way of doing things... 2 network
connections instead of one (1 to the servlet, 1 to JDBC) but it is
actually quote neat.
What's more it could be faster than using an applet. Why?
1. applets are very slow anyway
2. applet has to make a JDBC connection possibly using a firewall,
servlet talks HTTP
3. because servlet talks HTTP all you need is an engine that supports
persisitent connections and connection time will be further reduced.
Hope that helps.
Nic Ferrier
___________________________________________________________________________
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