Question: This is the language of Java Set Up Take the project that you created from last week and put it into a new git project
This is the language of Java
Set Up Take the project that you created from last week and put it into a new git project on gitlab. Ensure that JUnit is included in the Gradle dependency management file. Java FilesIn our customer support application, we are going to have some Plain Old Java Objects (POJO). These will be Ticket.java, Attachment.java, and TicketServlet.java. Create these three classes in your project and setup JUnit tests for them. Attachment will be a Java Bean. A Java Bean is a class with private fields and getter and setter methods for those fields, but nothing else. The fields for Attachment will be a name for the attachment and a byte array to store the contents of the attachment. Ticket will be a class that defines each customer's issue in a ticket form. The Ticket fields will be customer name, subject, body of the ticket, and a hash map to store the attachments that go with the ticket. The class will have the regular getters and setters for those fields. Ticket will also have a method to get an individual attachment and a method to get all of the attachments. Along with those two methods will also be the following methods: addAttachment and getNumberOfAttachments. Make sure that there are tests for each method of these two classes. These classes are the only ones that we will be writing tests for. TicketServlet will be our servlet file that will handle the requests for tickets from the user. We will need a Hash map that will keep track of our tickets. There will be the override of doGet and doPost methods. There will be some additional methods that will pull up our jsp pages that we will talk about further down in this assignment. The doGet will check the request parameter named action,using a switch that will then call the correct method based on which parameter is in the request. The different choices are to;Createa new ticketView an existing ticketDownload an attachmentList the existing ticketsThe doPostwill check the request parameter named action, using a switch that will then call the correct methodbased on which parameter is in therequest. The different choices are to;
Page 2of 2Create a new ticketList the ticketsRedirect to the tickets index pageThe rest of the TicketServlet is the methods that show the proper html pages using the tickets in the hash map.Attachment.java, Ticket.java,and TicketServlet.javahave been provided for you. You will need to add the Junit tests for the Attachment and Ticket classes. You will also have to put all of these files into the project that you created and get it toa working state. Once you have the above files into the project with the tests and in a working state, then you can move on to the next section.JSP Files In this section you will add the java server pages(jsp) to display the ticket information. To do this you will need to modify the TicketServlet file to call thefollowing .jsp pages instead of using the methods in the class to display the html informationin the switch in doGet and doPost.These are the JSP files that you will need to add.viewTicket will be a jsp page that displays anindividual ticket.You will use the html from the TicketServlet method viewTicket to make it look the same.listTickets will be a jsp page that displays all the tickets. You will use the html from the TicketServlet method listTickets to make it look the same.ticketForm will be a jsp page that gives a form to create a new ticket. You will use the html from the TicketServlet method showTicketForm to make it look the same.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
