0% found this document useful (0 votes)
43 views9 pages

BCSL057

ignou assignment

Uploaded by

mdshahid
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
43 views9 pages

BCSL057

ignou assignment

Uploaded by

mdshahid
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 9
OONIAZ UBLICATIONS Course Code : BCSL-057 Course Title : Web Programming Lab ‘Assignment Number : BCA(V)/L-057/Assignment/2024-25 Maximum Marks : 50 Z, bee Weightage : 25% www.ignousite.com oy Last Date of Submission : 31st October, 2024 (for July 2024 sess," 30th April, 2025 (for January 2025 session Note: This ssgnment only for students, nt for sel or upload any mata or website Allright reserve to IGNOU Stdy Helper. It Megalo share or reupload it If nything like thsi found, then appropriate action will be taken and apply copyright ACT to you. You willbe responsible for illegal work. So don't share and upload on any media, Q41.(a) Design and implementia website/web application consisting of three pages having the following layout: Home] [Mobile List] [Comments Top Division 7 Information Figure Layout of Web Pages Create three pages having the same layout as shown in Figure 1, The Top Division contains the following links: ii : Link to Home Page Link to a Mobile List Page created using JSP : Link to a Comments Page containing a form ‘The Informati n Divi of the three pages should be as per the following descripti (i) The Home Page should display the nameof the mobile store "Mobile for You". It should display the objectives and address of the mobile store. Ans. 1. Home Page (home.jsp) This page will display the name of the mobile store, its objectives, and its address. Ignou Study Helper-Sunil Poonia Page 1 Touay Stuy HELPee OONIAZ Sumit Poona UBLICATION. titles Home - Mobile for Yous/ttle>
Home Mobil List Comments
Mobile for Yous/h1>

Welcome to "Mobile for You", your trusted mobile store.

Our Objectives

We aim to provide the best quality mobile phones at competitive prices.

Address

1234 Mobile Street, Tech City, Country

Output: . eo - 29 x 2 @ Ohm Citmensuntaioon/Cekiconahinl so 8 ‘suoy onustinconed Mobile for Yous. Our Objectives ‘ap tony sepa a mp Address : Ignou Study Helper-Sunil Poonia Page 2 JOONIAS ; Tonay Stvoy HELPER UBLIcATION® SUNIL POOMIA (i) The Mobile List Page should be generated by a query to a database "Mobiles" having a single relation Mobile_ram (Mobile_make, RAM_size). ‘You must use JSP to connect to database and display information as: Mobile List Make RAM (GB) ‘Samsung. 2 ‘Apple 4 ‘You must display at least five mobiles in this list. Ans. Mobile List Page (mobile_list.jsp) ‘This page will display the mobile list generated from a database query. <%@ page import="java.sal.*" 96> Mobile List <- jop Division > "top-division"> 'home.jsp">Home ‘mobile_list.sp">Mobile List ‘comments jsp">Comments
Mobile List to < < <% wt // Database connection Class forNtame("com.mysq.c.jdbe Driver"); Connection conn = DriverManager.getConnection("jdbe:mysal://localhost:3306/mobiles", “username”, "password"); // Query to fetch mobile list Statement stmt = conn.createStatement(); ResultSet rs = stmt.executeQuery("SELECT Mobile_make, RAM_size FROM Mobile_ram"}; Ignou Study Helper-Sunil Poonia Page 3 OONIAZ UBLICATIONY. ‘// Displaying the result ina table while (rs.next()) { String make = rs.getString("Mobile_make"); int ram = rs.getint("RAM_ size"); %~ ste atd> -ctd> % ) conn.close(); } catch (Exception e) { e-printStackTrace(); %~ se om by eat wey oe?
Mobile MakeRAM (GB)
’>Error fetching datac/td> Output: Touay Stvoy HeLree Sune Poona Page 4 OONIAZ URI IFaTIONO © Ohh CiheSeiictoon/Cekin/ raat Boe Mobi i Comes Mobile List |: Exons Touay Stuy HELPee Sumte Pooma * Oe: il) The Comments Page should display a formas shown below : (Please do not write the code for processing or verification of the form) - \ece (eee) Rate the mobile Very good O ood =O Not so good © Ans. Comments Page (comments.jsp) ‘This page will display a form for user comments. omments,isp > | Page 5 s Touay Stvov HELPER OONIAZ ‘ SUNIL POONA UBLICATIONY. Comments
«Homes/a> «Mobile List Comments

Comments

Name: Very good

"not_so_good">Not so good/label>

'submit">Submit falue="Very good"> Output: Ignou Study Helper-Sunil Poonia Page 6 Touov Stvpy HELPER OONIAZ Sunie Poona URI IFaTIONO © Ohi Cihreiictoan/Cekiaomrerthiml * 018 $e Mabie Comme Comment =. Hee (b) Create an external CSS file that ensures that format of all the three pages is as per the layout of Figure 1. The background colour of Link Division should be light green. ‘You may make suitable assumptions, if needed. Ans. SS (styles.css) JF styles.css */ body { margin: 0; font-family: Arial, sans:serif; } .top-division { background-color: lightgreen; padding: 10px; display: flex; gap: 20x; border-bottom: 1px solid #tddd; stop-division a { text-decoration: none; color: #333; Ignou Study Helper-Sunil Poonia Page 7 OONIAZ UBLICATIONS. padding: 8px 16px; border-radius: 4px; transition: background-color 0.35; } Touay Stuy HELPee Sune Poona stop-division a:hover { background-color: ddd; } info-dvision { padding: 20x; : Output: 5 creer WEG eo 8 Mobile for Yorfen ong Noe lomo Msi ris yor ene be oe Our Objectives ‘We mm ome ie tes gu ble phnes a compete ce Address Page 8 OONIAZ URI IFaTIONO © Ohh CiheSeiictoon/Cekin/ raat * Oe: “it Mobi List Come Mobile List ey eo Hee Eee Ignou Study Helper-Sunil Poonia Page 9

You might also like