0% found this document useful (0 votes)
18 views4 pages

Web Programming With Java Biwp324 Midterm

The document is a midterm examination paper for the course BIWP324: Web Programming with Java, dated 05/04/2019, worth 20% of the overall semester assessment. It consists of three sections with a total of 60 marks, including multiple-choice questions in Section A and programming tasks in Section B. Candidates are instructed to answer all questions and return all examination materials upon completion.

Uploaded by

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

Web Programming With Java Biwp324 Midterm

The document is a midterm examination paper for the course BIWP324: Web Programming with Java, dated 05/04/2019, worth 20% of the overall semester assessment. It consists of three sections with a total of 60 marks, including multiple-choice questions in Section A and programming tasks in Section B. Candidates are instructed to answer all questions and return all examination materials upon completion.

Uploaded by

lekhotlamphohali
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

BIWP324· WEB PROGRAMMING WITH JAVA

MIDTERM EXAMINATION

Faculty : Information and Communications Technology


Date/Day : 05/04/2019
Duration : 2 hours

INFORMATION FOR CANDIDATES

1. This examination is worth 20% of the overall semester assessment.


2. The total number of marks available for this examination is 60.
3. This examination paper contains THREE (3) sections in FOUR (4) printed pages
including the cover page.

INSTRUCTIONS TO CANDIDATE

a) Answer ALL questions in Section A and B.


b) Write all your answers in the answer booklet provided.
c) If you make a mistake please put a single diagonal line through the section you wish
to be ignored by the examiner.
d) Return all examination papers and scripts upon completion of the examination
including any workings.
SECTION A [10 Marks]

1. Which of the following is not a implicit object?


A - request
B - response
C - cookie
D – session
2. response is instance of which class?
A - Response
B - HttpResponse
C - HttpServletResponse
D - ServletResponse
3. This object can be used to access other implicit objects in JSP.
A - request
B - page
C - context
D - pageContext
4. Which of the following is not a directive?
A - include
B - page
C - export
D – useBean
5. Which of the following is a server side technology?
A - html
B - jsp
C - javaScript
D - css
6. Consider the following code and select the correct statement about it from the
options below.
<%! int aNum = 5%>
The value of aNum is <%= aNum%>
(A) It will not flag any compile-time or runtime errors and will not print anything to the output.
(B) It will print "The value of aNum is 5" to the output.
(C) It will flag a compile-time error because of an incorrect declaration.
(D) It will throw a runtime exception while executing the expression.
7. Which of the following tags can you use to print the value of an expression to the
output stream?
(A) <%@ %>
(B) <%! %>
(C) <% %>
(D) <%= %>
8. The following declaration is valid or not?
<%@ page import="org.pskills.dbconnection.* " %>
<%@ page session="true" %>
<%@ page import="java.text.*" %>
(A) Valid
(B) Invalid
9. What will be the output of the following code?
<% int x = 5; %>
<%! int x = 10; %>
<%! int y = 50; %>
The value of b multiplied by a is <%= y * x %>

10. Which is not a implicit object in JSP?


a) pageContext
b) pageConfig
c) config
d) context
e) page
f) exception
g) Exception

(A) b,d and f


(B) b,d and g
(C) a,c and g
(D) a,b and e
SECTION B. [50 Marks]
1. Write a JSP program using the following implicit JSP objects,session,request,response
and out to implement user login verification.The user should be redirected to the
relevant JSP page depending on successful or unsuccessful login. [20 Marks]
2. Write a JavaBean Program named Students with the following properties:
FullName,Age and Id.The properties should have relevant getter and setter
methods.Implement useBean action along with its associated properties to access the
relevant getter and setter methods.Output should finally be displayed on the browser.
[20 Marks]
3. Clerk has opened a dealer shops that trades in HP computer accessories. Customers
can either purchase on cash or account/credit with a repayment period of 3months. A
10% interest is charged for credit customers. Write a JSP program to store and display
the information of the dealer shop.
[10 Marks]

You might also like