Answered step by step
Verified Expert Solution
Question
1 Approved Answer
A database stores the information of all items sold in an electronics store. Data type Item (items sold in the electronics store) Attribute Model Brand
A database stores the information of all items sold in an electronics store. Data type Item (items sold in the electronics store) Attribute Model Brand Price Stock SupplierID varchar(30) varchar(30) Integer Integer varchar(10) SupplierOfitem (Suppliers of different items, an item can have more than one supplier) Attribute Data type SupplierID varchar(10) Model varchar(30) SupplierPrice integer Complete the following JSP that list out the items with stocks less than the specified stock level together with the information of the suppliers. The specific stock level is given as a parameter named stockLevel. Class.forName("com.mysql.jdbc.Driver"); String url = "jdbc: mysql://localhost:3306/javadb"; Connection con = DriverManager.getConnection(uri, "dbuser", "secret"); content="text/html; Electronics store // Add code here %> The following example shows the content when the request URL is: http://localhost:8080/web/index.jsp?stockLevel=500 Item: Model: M123 Brand:Brand A Price:150 Stock:320 Suppliers: Supplier ID Supplier Price Si 45 S2 55 Model: M223 Brand:Brand B Price: 1500 Stock:12 Suppliers: Supplier ID Supplier Price Si 600 S2 540 The table illustrated that only two products have stocks less than 500. A database stores the information of all items sold in an electronics store. Data type Item (items sold in the electronics store) Attribute Model Brand Price Stock SupplierID varchar(30) varchar(30) Integer Integer varchar(10) SupplierOfitem (Suppliers of different items, an item can have more than one supplier) Attribute Data type SupplierID varchar(10) Model varchar(30) SupplierPrice integer Complete the following JSP that list out the items with stocks less than the specified stock level together with the information of the suppliers. The specific stock level is given as a parameter named stockLevel. Class.forName("com.mysql.jdbc.Driver"); String url = "jdbc: mysql://localhost:3306/javadb"; Connection con = DriverManager.getConnection(uri, "dbuser", "secret"); content="text/html; Electronics store // Add code here %> The following example shows the content when the request URL is: http://localhost:8080/web/index.jsp?stockLevel=500 Item: Model: M123 Brand:Brand A Price:150 Stock:320 Suppliers: Supplier ID Supplier Price Si 45 S2 55 Model: M223 Brand:Brand B Price: 1500 Stock:12 Suppliers: Supplier ID Supplier Price Si 600 S2 540 The table illustrated that only two products have stocks less than 500
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started