Closed

MVC model, JSP, SERVLET, DB

To rewrite this using the MVC architecture, you should write one servlet, and four JSP pages. Every HTTP request from the client initially is directed to the servlet. The servlet then does any computation that is required (e.g., adding or removing a book to/from the shopping cart or changing the number ordered). Also, based on parameter or session information, the servlet then dispatches the request to one of the four JSP pages, which displays the information required.

You should follow the MVC model? .? The servlet does all computation of data, and the JSP pages only display the data provided by the servlet. Preferably, the servlet should pass data to the JSP pages via beans, probably stored at the session scope.

Detailed instructions in the zip file.

## Deliverables

The assignment pertains to using **JSP**, and also to introduce the MVC architecture. You should use only **.jsp** pages to display information to the user, and only Servlets (and **preferably, just one servlet**) for data processing.

**? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Part-1**

Please place your Servlet code (and other Java classes, if you write others) in a **package** called **JspSolution**, and name your servlet `<b><span style="font-size: 10pt">BookstoreServlet</span></b>`, and also place your .jsp pages in a directory called **JspSolution** (which will sit under `<span style="font-size: 10pt">ROOT</span>`).

Your assignment is to rewrite the **bookstore/shopping cart** example from the book **Core Servlets and JavaServer Pages** (Marty Hall **chapter 9**-16 online version of book:

? **<[url removed, login to view]>** ? ? [url removed, login to view]

You're welcome to use some of the classes from the text example, but **please change their package name to be JspSolution** rather than coreservlets.

As you may see, this example has 5 pages:

* A "homepage", which lists the other pages the user can navigate to (Kids book page, Tech books page)

* Two pages that list the books which are available to order (Kids book page, Tech books page)

* The Order Page, which shows the contents of your shopping cart. This page lists a table, and in each row are the following: the Item ID of the book, the title and author of the book, the unit cost, the number ordered (with a button to "Update order"; i.e, change the number ordered), and the total cost.

* The checkout page, which is a simple .html file asking you to send a check to the book's authors

**To rewrite** this using the **MVC** architecture, you should write **one** servlet, and **four** JSP pages. **Every HTTP request from the client initially is directed to the servlet**. The servlet then does any computation that is required (e.g., adding or removing a book to/from the shopping cart or changing the number ordered). Also, based on parameter or session information, the servlet then dispatches the request to one of the four JSP pages, which displays the information required.

You should follow the **MVC model (see chapter 15 from book <[url removed, login to view]>? to learn about MVC model )** to the letter: the servlet does **all** computation of data, and the JSP pages **only** display the data provided by the servlet. Preferably, the servlet should pass data to the JSP pages via beans, probably stored at the session scope.

In the example in the book, the home page and the checkout page are simple HTML files. Please **make the home page a JSP file**, which is passed information telling them what to display. So, for example, on the homepage (let's say this is called `<span style="font-size: 10pt">[url removed, login to view]</span>`, the page should look for a **bean** (or perhaps a List of beans) stored at the session scope. Each bean should contain the title of one of the pages that list books (e.g., Kids book page), as well as the URL for the hyperlink displayed by `<span style="font-size: 10pt">[url removed, login to view]</span>` for that page. You can leave the checkout page as it is (in which case the Bookstore servlet will pass no information to this page when is dispatches the request).

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? **Part-2**

**After completing the above assignment, do the following:**

? Hook this application up to a database, instead of using the lame `<span style="font-size: 10pt">[url removed, login to view]</span>` class that is used in the textbook example. It is up to you to design the database, but presumably it should have a `<b><span style="font-size: 10pt">Books</span></b>` **table** which contains an itemID, a short description, a long description, and a cost (just like the `<span style="font-size: 10pt">[url removed, login to view]</span>` class from the textbook example). You might also want a `<b><span style="font-size: 10pt">pages</span></b>` **table**, which enumerates the pages of books for the application. This table might have page name, itemID, and seq_no attributes, indicating which books (given by their itemID's) should be displayed on the page, and in which order (as indicated by the seq_no attribute).

?

**Special Note:** So part-1 should be working independently (as you are not using DB in part-1 yet) as per specifications mentioned above. ? Put them in a package **? JspSolution.**

?

Then part 1&2 should be working together as well. Put them in a package **Jsp****DB****Solution****.** **Also enclose instructions how to compile and run them on tomcat.**

Skills: Engineering, Java, Microsoft Access, MySQL, PHP, Project Management, Software Architecture, Software Testing

See more: update used mvc model, write the data processing application special application, write java code online, write a book for kids, tech-four, row 44, php 7 mvc, order processing from home, order processing at home, order letter contents, online architecture design for home, navigate to home, mvc e php, list of books by author, learn online shopping cart, learn java code, learn code online, jsp a pdf online, * jsp, i want to learn java

About the Employer:
( 4 reviews ) United States

Project ID: #3763068

18 freelancers are bidding on average $66 for this job

kindcodersl

See private message.

$82.45 USD in 5 days
(272 Reviews)
6.8
jogomon2

See private message.

$85 USD in 5 days
(30 Reviews)
5.2
SNR

See private message.

$25.5 USD in 5 days
(8 Reviews)
4.9
obeliskinfo

See private message.

$42.5 USD in 5 days
(9 Reviews)
3.6
maneesha12

See private message.

$85 USD in 5 days
(5 Reviews)
3.6
swooppl

See private message.

$63.75 USD in 5 days
(18 Reviews)
3.6
Sinsope

See private message.

$59.5 USD in 5 days
(22 Reviews)
3.2
netmanivw

See private message.

$63.75 USD in 5 days
(2 Reviews)
3.0
informaticass

See private message.

$85 USD in 5 days
(8 Reviews)
2.6
ITGloboLine

See private message.

$85 USD in 5 days
(4 Reviews)
2.5
amegahed

See private message.

$68 USD in 5 days
(2 Reviews)
2.1
wesleyfreelance

See private message.

$68 USD in 5 days
(3 Reviews)
1.5
muhammadtaiyab

See private message.

$51 USD in 5 days
(0 Reviews)
0.0
sajid4java

See private message.

$51 USD in 5 days
(0 Reviews)
0.0
MrJavaMind

See private message.

$29.75 USD in 5 days
(0 Reviews)
0.0
hamadaelnopy

See private message.

$85 USD in 5 days
(0 Reviews)
0.0
rameshjasmine

See private message.

$81.6 USD in 5 days
(0 Reviews)
0.0
suketu9vw

See private message.

$76.5 USD in 5 days
(0 Reviews)
0.0