SnmpHttpAssignment Fall2023
SnmpHttpAssignment Fall2023
Description:
In this assignment you will develop HTML/PHP pages, Client Java Application, Servlet and JSP
Page as described below. You will use Both XAMP (or WAMP) server and Tomcat Apache Server.
Use the example Project that we did in class to help develop the required code.
Part 1:
You are required to develop an SNMP manager in PHP to send requests to an SNMP agent
(PC) and display the SNMP responses. Your manager should display the following
information in an appropriate style on different pages or section. Your Interface and Pages
should look nice.
Page1:
- Display the contents of all of the System Group except the Last item (System Services)
- The last three items Should be editable(Changeable). Therefore provide te ability to
change these item. Make sure you make the Community Read and Write to allow
writing to these items
Page 2:
-Display the content of UDP table.
Page 3:
-Display the content of the ARP table.
Page 4:
-Display the content of the TCP table.
Add Navigation, Next and Previous. Also Add a Main page if you like.
1
Part 2:
In this part you will write a Java Client, Servlet and JSP page
Server:
In addition to the HTTP server described above, write both a Servlet and JSP Page. We will
use them for simple authentication as follows:
a) The Servlet should receive ID and the Password to the Servlet. If they are correct return
“Permit”, otherwise return “Deny”.
b) The JSP Page should receive the Name and the Password. If they are correct, return
“Permit”, otherwise return “Deny”.
You can use a file that stores the names and passwords at the Server side (Manually enter
these values). If want you can also use a Database instead of the file.
Client:
Write a Java Application that uses the HTTP Connection Class similar to the example that I
demonstrated in class (Watch the HTTP recorded Lecture)
First the user must sign in. The client should have Text Boxes for User name, ID. and
Password. The client then should send the user name and password to the Tomcat Servlet.
Also add Two Buttons Verify1 and Verify2, if these are clicked then:
c) Verfiy1 Clicked: Send the ID and the Password to the Servlet. The response from the
Servlet should be either “Permit” or “Deny”.
d) Verfiy2 Clicked: Send the Name and the Password to the JSP. The response from the JSP
Page should be either “Permit” or “Deny”
If the Client Receives “Permit” from Both Servlet and JSP then allow the user to get the Get
the SNMP data from the PHP server. In other words, the Client should send an HTTP request
to the PHP server to get and display the contents of what is described in Page 1–4 above.
The last 3 element of the System group should be editable should be editable also.
For Example, to display the System Group, your client should send an HTTP request or
(more than One Request) to one the PHP pages. The PHP pure page then gets the SNMP
values and sends them back to the Client.
On Each Page put a Button to get the SNMP data for that specific Page. For example, for
Page1 the button will be labeled “Get System Data”. And on the Second it should be “Get
UDP Table” and so on. On page 1 for the editable value put a button next to each item.
2
Important Notes:
For Part1:
I suggest that you do not write PHP that contains HTML. You can do that if you want for
Part 1 but I suggest that you do not. Do this Instead.
1. Write pure PHP pages (No HTML for the server side that responds to an HTTP
request and sends back the result.
2. Use JavaScript in your client side to fetch the data from the PHP pages (Server Side)
and display them. You can use Ajax or fetch or any frame work you want.
For Part2:
Your PHP pages must be pure PHP pages. Therefore, it is better to use these pure PHP
pages for Part1 and Part2.
Submission Notes:
1. You can work either individually or in groups of 2.
2. Submit all resource files.
3. You may need to create a short Video and Upload to Drive and Provide a Link to the
Drive. Check with the TA (Eng. Renan Atrash”). If she does not require this video, do
not do it.