Skip to content
VUBuddy

CS506 Final Term Quiz 4 Jan 2024 by Miss Mehwish

Web Design and Development PDF 1.1 MBUpdated 23 Oct 2026
Final term past paper CS506 Final Term Quiz 4 Jan 2024 by Miss Mehwish PDF 1.1 MB
vubuddy.com
Type
Final term past paper
Course
CS506 Web Design and Development
Size
PDF 1.1 MB
Updated
23 Oct 2026
Free download 0 of 3 used today
Download free · 1.1 MB

You get 3 free files a day on the website. Add the Chrome extension for 30 a day.

Unlimited downloads in the Android app Get it free on Google Play

Preview text

Text from pages 1, 2, 3 of 30. Download the file for all 30 pages.

CS506 · Final Term (Live Quiz) · Past Papers for Mids./Finals are also Available

Q1. What are the requirements for a class to be considered a JavaBean? It must implement the java.beans. Bean interface.

It must be a subclass of the java.beans. JavaBean class. ✔ It must have a default constructor and follow specific naming conventions. There are no specific requirements for a class to be a JavaBean.

Q2. Servlet mapping is defined in ________

html ✔ web.xml servlet JSP

Q3. Which of the following object contains information specific to a servlet?

Q4. HTML comments are ____________ in browser and JSP comments are ________________ in browser.

shown, hidden shown, shown ✔ hidden, hidden hidden, shown

Q5. What is the purpose of the <servlet-mapping> tag in web.xml?

To define servlets with their class names. ✔ To specify the URL patterns that map to servlets. To configure servlet initialization parameters. To set session configuration for servlets.

Q6. Context attributes are shared among _____________ servlet/s of ___________. two, a web application

  1. all, a web application

all, desktop applications two, desktop applications

Q7. How to add a Cookie object to a HttpServletResponse in Java servlets? ✔ Using response.addCookie(cookie);

Using response.createCookie(cookie); Using response.setCookie(cookie); Using response.sendCookie(cookie);

Q8. JSP directives can be used to affect which part of the web application? Only the HTML content

The client-side JavaScript ✔ The overall structure of the servlet Only the database connection

Q9. What does request.getCookies() return in Java servlets?

A single Cookie object representing all cookies sent by the client. The expiration time of cookies sent by the client. The number of cookies sent by the client. ✔ An array of Cookie objects representing cookies sent by the client in the request.

Q1. Which design principle do JavaBeans adhere to?

Inheritance

Encapsulation ✓

Polymorphism Abstraction

Q2. Which of the following is not the stage of servlet lifecycle?

Wait ✓ Service Destroy

All CS506 files →
CS506 Web Design and Development All CS506 handouts, past papers, quizzes and MCQs in one place. Open course page

Get more out of VUBuddy, for free

Android app Free on Google Play
  • Unlimited downloads
  • The explanation behind every MCQ answer
  • Study offline on slow data
Get the Android app
Chrome extension Free on the Chrome Web Store
  • 30 downloads a day instead of 3
  • Sign in and buy Pro Semester here
Add to Chrome

One Pro Semester membership works in both the extension and the app.