Please Follow The Steps And Make Sure You Do The Optional

Question Description

SUMMARY

You will be working towards Project 2 part 1 that is posted in Assignments section. You need to complete the two JSP files where you see the ######## markings. You also will complete #1, #2, and attempt #3 in the DroneDataService.java file.

This lab will involve the following new features:

REST web service.

DETAILS

First go to C:Program FilesApache Software FoundationTomcat 8.5 … and change the security settings on the “webapps” folder to allow full control to users as we’ve done before.
Unzip the zip file into your tomcat “webapps” folder.

Your path should then be:

C:Program FilesApache Software FoundationTomcat 8.5webappsdronerecon

Inside the dronerecon folder, you should then have your JSPs, WEB-INF folder, etc. that are all included in the zip file.

NOTE: You may have a different version than 8.5 above for your path.

You will fill in code where you see the ######## markings in the following files:

DroneDataService.java
In the zip file:

drone_launch.jsp
drone_sim.jsp

If you’ve properly updated the JSP files…

You should be able to go to the following when Tomcat is running:

http://127.0.0.1:8080/dronerecon/drone_launch.jsp

After entering info and submitting, then you should see a grid printed with the proper number of cols and rows that you entered on the drone_sim.jsp page.

For DroneDataService.java editing…

Create a new java project (if using NetBeans, choose a “class library” type of project) because you will be eventually creating a JAR file when done to deploy to Tomcat.
In the src folder in your project, create a folder structure of comdronereconws, or you can create a new package by right clicking on src if using IntelliJ and entering in com.dronerecon.ws – you will see this already at the top of the DroneDataService.java file:

package com.dronerecon.ws;
This represents the folder structure in your src folder.

Put the java file that is on the Assignments page for Project 2 into the ws folder.
It should appear in your IDE project.

In the java file, edit and complete #1 and #2, and then try to make an attempt at #3, but if you don’t complete it properly, that’s okay! And don’t worry about #4 unless you want to try to get it all working before next class. We will finish this file in class next time.
OPTIONAL: If you do happen to finish the file and want to see if you can get it to work, then you would…

Add the servlet api jar from tomcat to your project library by doing this:

IntelliJ: Look back at the posted instructions from Week 11’s module.
NetBeans IDE: Right click the “Libraries” folder in your NetBeans project and choose “Add JAR/Folder”, and then navigate to your Tomcat folder in the lib folder and choose “servlet-api.jar”.

Build this project so that a JAR file is created.

IntelliJ: Same instruction file from Week 11’s module.

And then you would put this JAR file in your dronereconWEB-INFlib folder.
(HINT: if you’re going to take on this then the JSON string you build has to be returned correctly, and to include quotes as part of your string you have to escape it, which just means a before the quote like this … String sExample = “this quote ” is ignored as an ending java quote mark because of the slash”;)

TURNING IN LAB:

Turn in the above 3 files (2 JSPs and 1 java file) into your lab 10 assignment spot in Canvas.
IMPORTANT: DO NOT ZIP your folders/files please.

How to create Testimonial Carousel using Bootstrap5

Clients' Reviews about Our Services