×

Loading...

More details

本文发表在 rolia.net 枫下论坛Sorry, I didn't read your post in time.

Another contact manager program reads first name, sure name and phone number from a text file and create a Contact object with name and phone number. The the contact manager puts the object of Contact into a ordered linked list which was already created.

QueryServlet receives string input from the user in html(submit form). If the length of the string is 1 (one character) then it opens a new browser window and use FirstLetterQueryServlet to show all the contact with the name starting with that character.

If the length of the string is greater than 1 (a string) then it use SurnameQueryServlet to open a new window to show all the contacts starts with the string input.

Now I know how to open a new window in servlet and transfer parameters between servlet. What I am not sure is:

1. How to handle different input in QueryServlet (invoke different servlet with Char or String)?

2. How do the three servlets communicate with the contact manager program?

Thank you very much, Jeffery and look forward to hearing from you.更多精彩文章及讨论,请光临枫下论坛 rolia.net
Report

Replies, comments and Discussions: