Question

In: Computer Science

Create a Web application that display an animal classification. For the classification uses the given csv...

Create a Web application that display an animal classification. For the classification uses the given csv file: test1.csv
(open up the csv file in any no-code insertion text editor like: notepad, wordpad (windows); or vi, emacs, nano, pico (Macs)
– just plain text editor NOT word processor like Word, Pages, etc). The csv file contains information on
the types, traits, and examples of animal classification.
Give the user the following options (it can be in radio buttons) to see the information:
1. The examples of animals in alphabetical order for each type
2. Any oviparous animal, and
3. Which and how many are cold-blooded?
Note. Implement the application with HTML/Javascript and JSP. The application should be treated as a client-server application.

Solutions

Expert Solution

SOLUTION :

CONSIDERING THE CONDITIONS AND REQUIREMENTS FROM THE QUESTION.

HERE

Step 1: Create a maven project in intellij idea.

Step 2: Insert the tomcat maven plugin (Optional for Intellij Idea Ultimate users)

Add the following tomcat plugin under the plugins tag in the pom.xml.

Step 3: Creating the web app

3.1 Creating the first web page

Let's create the entry HTML page for our Liquor Shop app. This will be the first page that the users will see when they visit.

Create a directory named webapp under the src/main/ and insert the following index.html file inside the webapp directory.

This page will prompt the user to select the type of liquor and submit the selection. After pressing the submit button the application will send a POST request containing the user selected type of liquor to the SelectLiquor servlet.

3.2. Creating the LiquorType enum class

We’ll use an enum class to hold the liquor types of our app. Create a LiquorType.java class inside the src/main/java/ with a package name com.sample.model.

3.3. Implementing the business logic

Then we’ll have to create a service class to hold the business logic of the app. This is a simple java class that has the required methods defined.

Create a LiquorService.java class inside the src/main/java/ with a package name com.sample

This class has the getAvailableBrands() method which will return a list of brands for the given liquor type.

3.4. Creating the Servlet Class

Next, let's create the SelectLiquorSevlet.java class that handles the user request from the HTML page.

Create a SelectLiquorServlet.java class inside the src/main/java with a package name com.sample

The SelectLiquorServlet class will accept the POST request from the form submission and invoke the doPost() method.

I have overridden the doPost() method to get the “Type” of liquor sent from the form submission done by the index.html and get the available list of brands from the getAvailableBrands() method.

There is also a similar method called doGet() that can be overridden to handle the GET requests.

NOTE : PLEASE UPVOTE ITS VERY MUCH IMPORTANT FOR ME A LOT. PLZZ......


Related Solutions

Create a mockup of your web application that will display a list of favorites. Remember, this...
Create a mockup of your web application that will display a list of favorites. Remember, this can be a list of any favorite items, such as books, movies, restaurants, music, and so on. Your web application should contain at least 3 pages (HTML documents). Your mockup should contain mockups of each HTML document. You should follow a similar format as the sample mockup provided here. Your 5-6-page document should include the following: A description of the site's organizational structure. A...
Create a web application for a daily planner in HTML. Please include testing in the files...
Create a web application for a daily planner in HTML. Please include testing in the files and show correct code formatting.
Create an empty Web Site application named Bakery. Add a new Web page named Default.aspx to the application. Change the DOCUMENT object's Title property to Meyer's.
In Visual BasicCreate an empty Web Site application named Bakery. Add a new Web page named Default.aspx to the application. Change the DOCUMENT object's Title property to Meyer's. The application should allow the user to enter two items: the number of doughnuts ordered and the number of muffins ordered. The application should should display the total number of items ordered and the total sales amount, inlcuding a 5% sales tax. A doughnut costs .50; a muffin costs .75. Save the...
Treating the two web pages as two views of a Single Page Application (SPA), create the...
Treating the two web pages as two views of a Single Page Application (SPA), create the SPA with two views, one shows what the page in any one question displays and the other shows what the page in other questions  displays
Create an application that uses a constructor and two different methods. JAVA
Create an application that uses a constructor and two different methods. JAVA
How would I create a nested dictionary given a csv file in Python? Say I want...
How would I create a nested dictionary given a csv file in Python? Say I want to make a dictionary that read {'country':{'China':'Fit', 'China':'Overweight', 'USA': 'Overweight', 'USA': 'Fit', 'England':'Fit'...}, 'category':{'Asian':'Fit', 'Caucasian': 'Overweight', 'Caucasian':'Overweight', 'Asian': 'Fit', 'Middle Eastern': 'Fit'...}} given a file that had country category Weight China Asian Fit China Caucasian Overweight USA Caucasian Overweight USA Asian Fit England Middle Eastern Fit... ... And so on in the file.
For your final project, you are to create a two-page web application of your choice. ASP.NET...
For your final project, you are to create a two-page web application of your choice. ASP.NET : C# You must include the following items: At least 5 different standard server controls At least 2 validation controls At least 1 navigation control ~ one must navigate back and forth to each page One session state element Upon completion of your two-page web application, you will provide a two page report describing the functions of the web application as well as each...
Web Application Development Course - C# Update the ASP.NET web application code by adding below functionality:...
Web Application Development Course - C# Update the ASP.NET web application code by adding below functionality: • Create a new web form called Welcome.aspx and add labels to show name, company, email, and membership. • Create a new business layer class called Customer to hold the entered user details • When the user clicks on Sign Up button and if all the validations on the page pass o Store the details entered on page in the Customer object. o Save...
Create an Java application that uses a class to convert number grades to letter grades and...
Create an Java application that uses a class to convert number grades to letter grades and another class for data validation. Specifications The Grade class should have only one Instance Variable of type int. Use a class named Grade to store the data for each grade. This class should include these three methods:   public void setNumber(int number)   public int getNumber()   public String getLetter() The Grade class should have two constructors. The first one should accept no parameters and set the...
An animal in our JunglePark application needs to check whether another animal is in its neighborhood...
An animal in our JunglePark application needs to check whether another animal is in its neighborhood (close to it). To implement this behavior, add isClose() method to the Animal base class and implement it. This method must have the following signature. public boolean isClose(Animal otherAnimal, int range) { } The isClose() method returns TRUE if otherAnimal is located within a range distance [0 .. range] around the current animal and FALSE otherwise.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT