Question 1:
(3.0 points)
You are given a NetBeans template project (read more detail in the first page). The given project already added index.html.
Your tasks:
Edit index.html to create a web page page and user can access your page via url /index.html (0.5point)
Enter an integer number n:
Sum odd
Execute
Zoom
Sum even
(When the web page runs, if the interface is not the same as above, 0.5 points will be deducted)
Assume that users fill an integer into the textfield (called n).
When users click "Execute" button, the browser makes a request to /sum using Post method (TheServlet is configured in web.xml) (0.5 point):
a. Check validate input n:
- If users input a value is not an integer number > 5, show the error text "You must input an integer> 5" to servlet. (0.5 point)
If users do not choose any option, show the error text "You must choose an option" to servlet.(0.5 point)
b.Execute:
+ 100%
Close