Now you will build database-driven pages on the Movies Galore site. You will modify the existing movies.jsp and create another three JSP file, moviedetail.jsp, artists.jsp, and artistdetail.jsp.

BCIS 3680 Enterprise Programming

Assignment 5

Now you will build database-driven pages on the Movies Galore site. You will modify the existing movies.jsp and create another three JSP file, moviedetail.jsp, artists.jsp, and artistdetail.jsp.

1. Make a copy of your deployment folder for Assignment 4 and rename it to 3680-HW5YourLastName-YourFirstName.
2. Start MySQL and once you are logged in to MySQL, create a new database by the name , e.g., maib.
3. Download the two script files for the movie database to use for this assignment.
4. In MySQL, use the source command to run createmovies.sql and then addmovies.sql. This should create four tables – movie, disc, artist, and artistmovie – and populate those tables with data.
5. Run show tables to make sure that you see all the four tables:

6. For each table, run the select * command to check whether you have data in the table. For example, you should see the following in the movie and artist tables:

7. The user still logs in from default.htm (no changes needed in this page):

8. Again, a successful login will take the user to main.jsp. On surface, the page looks exactly the same like before. But behind the scene, modify the code of this page so that a session variable is created to store the user’s username. This username will be displayed here and then in all the other three JSP pages.

9. Now, when the user clicks the Browse Movies Catalaog link in main.jsp, movies.jsp will show up and display information about the movies. Take all necessary actions (the lib subfolder in WEB-INF and its content, database connection code in movies.jsp, and so on) so that movies.jsp is able to connect to the database and retrieve info from there.

Specifications of this page:
 The username of the logged-in user appears after the wording Report prepared by: (it doesn’t have to be colored). Retrieve this name from the session variable created earlier.
 For each movie, add a radio button at the beginning of its row. Set the value attribute of the radio button to the MID of that movie. Name the radio button group selMID. No further coding is needed.
 The title of each movie is displayed as a hyperlink. The destination of the hyperlink is moviedetail.jsp. To make the detail page dynamic (specific to the movie title clicked), include in this hyperlink a manually crafted query string that contains a movieid parameter, whose value is the primary key (mid) of the respective movie in the movie table.

10. When moviedetail.jsp loads, it contains the movie ID (the mid column in the movie table) of the movie clicked and, again, the username. The two pieces of information are displayed as shown below. For example, if Justin was logged in and in movies.jsp he clicked the title Robin Hood, whose mid is 10002, the text displayed in moviediscs.jsp will be “Info on Movie #10002 will be available soon.” Justin again shows up as the preparer of the report.

11. Clicking the Artists link in the navigation bar displays artists.jsp, which shows all entries in the artist table:

Specifications of this page:
 Each artist should be displayed as first name followed by last name.
 The names are listed in alphabetical order by last name.
 Each artist is displayed as a hyperlink. Clicking the link will take a visitor to artistdetail.jsp.
 The logged-in user (in this case, Justin) is displayed as the report preparer.

12. The artistdetail.jsp page displays information on an artist. For example, the following is the Keanu Reeves page:

Specifications of this page:
 The logged-in user is displayed as the report preparer.
 The artist’s name (first name followed by last name) is the title of the page.
 The top portion shows the artist’s name (first name followed by last name) in bold (

).
 The year in which the artist was born is shown as four-digit year only.
 The Country of birth field info is retrieved from the birthplace column in the artist table.
 The IMDB Bio field shows the URL to the artist’s biography page on IMDB site. This URL follows a standard format (http://www.imdb.com/name//, where is to be replaced by the value you retrieve from the imdb column in the artist table. All artists have a value in this column.
 The Website field shows the URL of an artist’s official website, Facebook page, fan site, etc., if available. The value comes from the url column in the artist table. Unlike the imdb column, all artists do not have a value in url. If for an artist the url column contains no information, then this field does not appear at all. For example:

 Clicking the IMDB Pro link opens up the artist bio page in a separate window (using IE) or a new tab (default in FireFox but it can be configured to be a new window as well):

 Similarly, clicking the Website link opens the site in a new window/tab:

Preparing Your Submission

You deployment/submission folder now has the following contents (ignore the “database” subfoler):

Submission

Due Date: Friday, 4/27 (11:59 PM)
Below are steps to follow for submission:
 Submit your assignments only through Blackboard.
 Assignments submitted to the instructor or grader by email will NOT be graded, unless you are instructed to do so.
 Make sure in the 3680-HW5-YourLastName-YourFirstName folder you have the content as shown in the above screenshot to ensure the proper functioning of the web app.
 Zip the folder into 3680-HW5-YourLastName-YourFirstName.zip.
 Submit the zip file as an attachment on Blackboard.
 Before the assignment is due, you may resubmit your work for unlimited times. Simply attach a new version of your assignment. Only the attachment with the latest timestamp will be graded.  Failure to comply with these requirements will cause point deduction.

Order This Solution

Ask your homework question

 

INDIVIDUAL APPROACH:
Chat with every writer who applies to your request, and view their skills and portfolio. Make the choice that’s right for you.
MANAGE YOUR ORDER:
Monitor progress and see any changes made. Have full control over every phase of the process.
COMMUNICATE:
Ask your writer questions and provide your ideas about your paper. Produce the exact result that you want.
ENJOY THE OUTCOME:
Get everything done on time with high quality. Writing papers is much simpler with us.

Ask your homework question

 

© 2017 theacademicessays. All Rights Reserved. Design & Developed by theacademicessays.
Loading...