Question: 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

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.

Find Current Score - Mozila Fiefox Ie Edt ew igory Dookarks Toos

Find Current Score - Mozila Fiefox Ie Edt ew igory Dookarks Toos Biep Find Current Score a bcahcst 8080/chapter37servictoxercise/Excrdsc37 05.html vC GP Exercise37_06 - Mozilla Firefox Ele Edit View Hstory Bookmarks Tools Help Find your current score Exercise37_06 SSN 111-22-3333 use xxx-x-XX O localhost:8080/chapter37servietexerdise/Exercise37_067ssn= Course CSC1301 - John F Smith 94.5 Submit Reset () (b)

Step by Step Solution

3.41 Rating (189 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Here is an example of a servlet that can display the student name and current score for a given SSN and class ID import javaio import javaxservlet imp... 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!