Skip to content

Labs 2

Now we will create another Dynamic Web Application to display a randomly generated name.

  1. Create a Dynamic Web Project called NameChooser.

  2. Create a servlet that returns an HTML document containing a randomly chosen first and last name. Sample names are listed below.

  3. 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"

Prev -- Up