Labs 2
Now we will create another Dynamic Web Application to display a randomly generated name.
-
Create a Dynamic Web Project called
NameChooser. -
Create a servlet that returns an HTML document containing a randomly chosen first and last name. Sample names are listed below.
-
Map the servlet to a URL in your
web.xml, and set the welcome page to that URL.
(Solution: NameChooserSolution/)
First Names¶
"Stacie",
"Youlanda",
"Loma",
"Jeri",
"Erin",
"Damon",
"Marielle",
"India",
"America",
"Quinn",
"Vallie",
"Shalon",
"Alonzo",
"Ruthie",
"Lindsey",
"Richard",
"Dorthy",
"Devona",
"Judi",
"Caterina",
"Rossana",
"Aracely",
"Clara",
"Ebonie",
"Sindy",
"Stephnie",
"Blythe",
"Lakendra",
"Marget",
"Tommy"
Last Names¶
"Anderson",
"Weber",
"Holt",
"Dennis",
"Gentry",
"Levy",
"Roy",
"Arellano",
"Molina",
"Simon",
"Salazar",
"Heath",
"Haley",
"Williams",
"Graves",
"Malone",
"Thomas",
"Farley",
"Young",
"Bryant",
"Keith",
"Clayton",
"Warren",
"Hartman",
"Daugherty",
"Grimes",
"Hall",
"Medina",
"Patrick",
"Salinas"