Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I have a JSP File and SQLITE File database . I need someone to fix and run this code in the eclipse and send me

I have a JSP File and SQLITE File database . I need someone to fix and run this code in the eclipse and send me the screen shot output of all book records displayed for each category, to MS Word document and send to email manalochristian574 This is the file so you can easily to fix https://drive.google.com/drive/folders/13IIog9rotfsMXTdHSBIZWaMoi1roqQRT?usp=share_link

This is the instruction of my work.

Create a JSP app that will display books coming from a book database ( A DB that was created, book.db ).

All books will be displayed dynamically based on the book category selected by the user from web html form. Use html table to display the books properly.

JSP CODE:

<%@ page import="java.sql.*" %>

<%@ page import="java.sql.DriverManager" %>

<%@ page import="org.sqlite.JDBC" %>

<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding ="ISO-8859-1"%>

<%

// Initialize variables String bookcategory = request.getParameter("bookcategory");

// Load the SQLite JDBC driver Class.forName("org.sqlite.JDBC");

// Establish a connection to the database Connection conn = DriverManager.getConnection("jdbc:sqlite:C:\\Users\\USER\\Downloads\\aljon\\DATABASE\ iverabook.db");

// Create a statement object Statement stmt = conn.createStatement();

// Select the books with the specified category String sql = "SELECT * FROM riverabookinfo WHERE bookcategory = '" + bookcategory + "'"; ResultSet rs = stmt.executeQuery(sql); %>

Book Database

<% while (rs.next()) { int bookId = rs.getInt("bookid"); String bookTitle = rs.getString("booktitle"); String bookDescription = rs.getString("bookdescription"); String bookAuthor = rs.getString("bookauthor"); Date bookDatePublish = rs.getDate("bookdatepublish"); int bookPageTotal = rs.getInt("bookpagetotal"); %> <% } %>
Book ID Book Category Book Title Book Description Book Author Date Published Total Pages
<%= bookId %> <%= bookcategory %> <%= bookTitle %> <%= bookDescription %> <%= bookAuthor %> <%= bookDatePublish %> <%= bookPageTotal %>

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

1. Identify three approaches to culture.

Answered: 1 week ago

Question

2. Define communication.

Answered: 1 week ago