Question: Rewrite Exercise 37.6 using servlets. Data from Exercise 37.6 Write a servlet that displays the student name and the current score, given the SSN and

Rewrite Exercise 37.6 using servlets.

Data from Exercise 37.6

Write a servlet that displays the student name and the current score, given the SSN and class ID. For each class, a text file is used to store the student name, SSN, and current score. The file is named after the class ID with .txt extension. For instance, if the class ID were csci1301, the file name would be csci1301.txt. Suppose each line consists of student name, SSN, and score. These three items are separated by the # sign. Create an HTML form that enables the user to enter the SSN and class ID, as shown in Figure 37.29a. Upon clicking the Submit button, the result is displayed, as shown in Figure 37.29b. If the SSN or the class ID does not match, report an error. Assume three courses are available: CSCI1301, CSCI1302, and CSCI3720.

ten aet Flad your curent scere Ceane CaINI John F Smith 94.5

ten aet Flad your curent scere Ceane CaINI John F Smith 94.5 Sert Rece (a) (b)

Step by Step Solution

3.46 Rating (146 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Here is an example of a servlet that displays the student name and current score for a given SSN and ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Introduction to Java Programming and Data Structure Questions!