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 15:00
I'm taking a class on how to make a movie, and it offers some apps that would be in the process. the thing is, i don't have any of those ha. if you have any tips on some apps i could use, that would be awesome. i don't have an iphone, so don't suggest any apps like imovie. i know that this is a weird question, but it would be super for me. : )
Answers: 2
question
Computers and Technology, 23.06.2019 11:00
How should you specify box sizes on a web page if you want the boxes to vary according to the font size of the text they contain? a. in pixels b. in inches c. as percentages d. in em units
Answers: 2
question
Computers and Technology, 23.06.2019 13:30
Font size, font style, and are all aspects of character formatting.
Answers: 2
question
Computers and Technology, 24.06.2019 15:20
Local area networks use many of the same network technologies and the internet, only on a smaller scale. devices that access lans are equipped with a network interface that contains circuitry for wireless or wired connections. devices also have a physical address, in addition to the ip addresses acquired from a dhcp server. the most popular wired technology is . the most popular wireless technology is , which can be configured as a(n) or star topology. setting up a lan and configuring its router is fairly easy. the first step is to change the standard to one that is secure. next, create a(n) that uniquely identifies the network by name. it is also important to activate wireless to prevent wireless signals from being intercepted during transmission. a limited-access network can be created for visitors to use. by activating , the router will be able to assign ip addresses to each device that joins the network. to connect to a secure lan that is protected by encryption, an encryption , or password, is required. lans can be used to access data collected by iot devices and the networks that tie these devices together. technologies such as rfid, nfc, bluetooth smart, zigbee, and z-wave offer -power links, essential for battery-powered devices that can’t expend excess amounts of energy transmitting data.
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
Mathematics, 16.06.2021 21:20
question
Mathematics, 16.06.2021 21:20
question
Biology, 16.06.2021 21:20
question
History, 16.06.2021 21:20