subject

The exercises listed below are intended to provide an instructive way to get used to servlets and jsp. complete all three exercises. exercise 1 – getting used to jsp
a) write a simple jsp page that prints out a series of consecutive numbers by using a java loop construction. the output could be for example: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10b) modify your first jsp page (1a) such that it prints out the series of numbers given below using a java loop: 1, 4, 9, 16, 25, 36, 49, 64, 81, 100c) modify the jsp page further such that it prints in each line the sum of the squared numbers iterated through so far, as shown below: 12 = 1
12 + 22 = 1 + 4 = 5
12 + 22 + 32 = 1 + 4 + 9 = 14 and so ond) in order to make the list printed out by the previous jsp page easier to read, change the font color every other line. exercise 2 – generating a random number tablea) write a jsp page, which presents 75 random integer numbers from {0,1, 10} in a table with 5 columns and 28 rows as follows: the random numbers are listed in the first three columns, with the sum and the average of the random numbers of a particular row given in the last two columns. headers for the five columns ("trial 1", "trial 2", "trial 3", "horizontal sum", "horizontal average") are printed in the upper row. finally, the sum and average of the three columns are printed in the last two rows and the according headers ("vertical sum", and "vertical average") are given in fourth column. try to make the table easy to read by, for example, limiting the number of displayed digits, using bold fonts, choosing appropriate font and background colors. b) implement exercise 2a) as a servlet.
c) modify the servlet created in exercise 2b) so that the random numbers only change on a new sessionhint: on a new session, initialize random() with the current time and save time; on an existing session, initialize random() with time saved previously in the session scope. exercise 3 – responding to a user requestwrite a jsp application comprising of two parts. the page "collectuserinput. jsp" provides three fields which enable the user to specify input for a random number experiment: the number of trials ntrial, the minimum random number nmin, and the maximum random number nmax. by clicking the "submit" button, the ".jsp" page is requested. this jsp presents these numbers, performs an experiment where ntrial random numbers between nmin and nmax are drawn and lists the relative frequencies (how often this number was drawn in percent) for all the numbers between nmin and nmax.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 06:30
This technology is used to produce high-quality documents that look good on the computer screen and in print. wiki presentation paint desktop publishing
Answers: 3
question
Computers and Technology, 22.06.2019 11:00
Technician a says that the radiator usually cools better if the front air dam is removed. technician b says that when a condenser has a leak it can be repaired easily with epoxy. who is correct?
Answers: 1
question
Computers and Technology, 22.06.2019 11:10
The total cost of textbooks for the term was collected from 36 students. create a histogram for this data. $140 $160 $160 $165 $180 $220 $235 $240 $250 $260 $280 $285 $285 $285 $290 $300 $300 $305 $310 $310 $315 $315 $320 $320 $330 $340 $345 $350 $355 $360 $360 $380 $395 $420 $460 $460
Answers: 2
question
Computers and Technology, 22.06.2019 13:30
Write lines of verse that rhyme to remember the following information: acid rain is a type of air pollution caused by chemicals in the air.
Answers: 1
You know the right answer?
The exercises listed below are intended to provide an instructive way to get used to servlets and js...
Questions
question
Biology, 04.12.2020 01:00
question
Mathematics, 04.12.2020 01:00
question
English, 04.12.2020 01:00
Questions on the website: 13722360