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 1Touay Stuy HELPee
OONIAZ
Sumit Poona
UBLICATION.
titles Home - Mobile for Yous/ttle>
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 2JOONIAS ; 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
<
Mobile Make
<
RAM (GB)
<%
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 3OONIAZ
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();
%~