0% found this document useful (0 votes)
30 views4 pages

Fall PEprj 301

The document contains instructions for three programming tasks. The first task involves adding functionality to reset and submit a form that calculates the least common multiple. The second task involves adding a form to add exam information and displaying added info. The third task involves building a web application to view, add, delete and filter supplier data from a database.

Uploaded by

longpthe172420
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views4 pages

Fall PEprj 301

The document contains instructions for three programming tasks. The first task involves adding functionality to reset and submit a form that calculates the least common multiple. The second task involves adding a form to add exam information and displaying added info. The third task involves building a web application to view, add, delete and filter supplier data from a database.

Uploaded by

longpthe172420
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Question 1:

Edit index.html to create a web page

Your tasks: Assume that users fill an integer into the textfield

1. When users click "RESET" button, set value of textfield is empty.


(0.5 point)

2. When users click "Execute" button, the browser makes a request


to /execute with method post (The Servlet is configured in web.xml)
(0.5 point):

a. Check input: If users input the value of a or b small than or


equal 0, show the error message "You must input a > 0 and b >
0”. Otherwise, make the request b. (0.5 point)

b. Calculate the least common multiple output the result to


servlet. (1.0 point)
Exmaple: a = -1 , b = 2 => output: You must input a > 0 and b > 0
Exmaple: a = 2 , b = 3 => output: a = 2 and b = 3 => out put: 6

Question 2:
Add MyExam.jsp to the create a web page (0.5 point)
Assume that users fill fully into the textfield, when users click
"Add" button, the browser makes a request to /addServlet
(The Servlet is configured in web.xml) (0.5 point)

a. Check input: If users input have field empty, show the


error text " You must input all texts". (1 point)

b. When user click “Add” then info will display following.


(1.0 point)
Question 3:
IMPORTANT before you start doing your solution, MUST do
the following steps:
1. Create your SQL database named Y23FA1B1 by running
code in script Y23FA1B1.sql.
2. You MUST use DBContext.java for your all database
connection.
(5 points)
You are given a NetBeans template project (read more detail
in the first page).
are asked to build a web application using the given
database.
User can type /show represents your web application context
path) to access Show Students Page (0.5)
 Display form and list supplier (1 point)

 The table “List of Suppliers” must load data from [Suppliers]


table.(1 point)

 Click “delete” will remove the supplier (1 point)

 When input supplier name and click “Filter by name” will filter
supplier according name, list all supplier containt value input (1
point)

 When input supplier birth of year and click “Filter by year” will
filter supplier according year. (0.5 point)

You might also like