Reference no: EM13163887
Description:
Create a web application for Sheridan Restaurant Reviews that contains the following functionality:
• Display a table of all restaurants based on the city entered by the user and whether the restaurants allow take-out orders or not
• Allow the user to update the ratings of a restaurant
1. Database - Restaurants.sql
The provided script does the following:
- Creates a new database called RestaurantReviews
- Creates a new table called Review and populates it with some records:
o ReviewId - An auto-incremented value that represents this table's primary key
o Restaurant - The name of the restaurant
o Food - The restaurant's score for food
o Service - The restaurant's score for service
o Price - The restaurant's score for menu prices
o Location - The city where the restaurant is located
o Cuisine - The type of cuisine served at the restaurant
o TakeOut - A true value indicates that the restaurant allows for take-out orders
2. Your Web Application
a) Make sure the DBConnection and MySQL JDBC Driver libraries are imported in your new project.
b) Modify index.html by adding two HTML forms - one for each function within the application.
• Each form should send a request to an appropriate servlet
• The Price Rating field when updating a restaurant review should be a dropdown list with the values 1, 2, 3, 4, 5 in that order
c) Your database configuration must be stored as a series of context-initialization parameters.
d) Your solution must have a ServletContextListener that does the following when the application loads:
• Get the database configuration from the ServletContext
• Construct a new DBConnection object based on the database configuration
• Store the DBConnection object as a ServletContext attribute
e) Create a JavaBean that maps with the Review table of the database
f) Create a DAO class that contains methods that do the following:
• Get restaurants by location. This method should have parameters for a Connection object, the city, and whether to return restaurants that allow take-out orders. Your results should be ordered by descending food rating, then descending service rating.
The method should return a list of Review beans.
• Update a restaurant review. This method should have parameters for a Connection object and the values required to update a restaurant review's ratings. The method should return true if the new review was successfully updated, false otherwise.
g) Create a servlet that handles requests to get a list of restaurants by location
• The request should be forwarded to a JSP which will display a table of those restaurants
h) Create a servlet that handles requests to update a restaurant's review
• Forward the request to index.html if the restaurant review was successfully updated
• Forward the request to an error page if the restaurant review was not updated
i) Create a JSP that displays a table of all restaurants that match the selected criteria. Below is the sample page if the user wanted to view all restaurants in Brampton that allow take-out:
Medical technician uses a pair of four inch long tweezers
: A medical technician uses a pair of four inch long tweezers. If more than 1/5 knew of force is applied to the silver, it will break and become difficult to remove. Using a static equlibrium calculations, calculate how far from the fulcrum the tweez..
|
Compute the new ph of the solution
: Now take another 37 mL of the 0.50 M pH 6.83 buffer and add 1.3 mL of 1.00 M NaOH. Using steps similar to those above, calculate the new pH of the solution.
|
Toy maker sells a large amount of toys
: Because a toy maker sells a large amount of toys, it is able to acquire plastic products to make the toys at a cheaper price than the competition. The toy maker is taking advantage of:
|
What is the theoretical yield of aspirin in the reaction
: What is the theoretical yield of aspirin in the reaction of 3.60 grams of salicylic acid with excess acetic anhydride?
|
Create a web application for sheridan restaurant
: Create a web application for Sheridan Restaurant Reviews that contains the following functionality - Display a table of all restaurants based on the city entered by the user
|
How will this influence the efficiency of ion exchange
: if the level of solution in the column drops below the level of the resin, channels will be formed in the resin column.How will this influence the efficiency of ion exchange in the column?
|
Afford national health care insurance
: If politicians are overly biased in their feelings, how might change take place, do we as a nation need change, can we afford national health care insurance, who would run it, would it be all inclusive?
|
What is the mass of the fishing weight in grams
: The temperature of a lead fishing weight rises from 15 oC to 45 oC as it absorbs 22.5 kJ of heat. What is the mass of the fishing weight in grams? Heat capacity of lead is 0.128 J/g oC.
|
Define the henderson hasselbalch equation
: What concentrations of [K2HPO4] and [KH2PO4] will you need to make the total concentration 0.50 M? 3.) How many moles of K2HPO4 and KH2PO4 will you need? 4.) What mass of K2HPO4 and KH2PO4 will you need?
|