CS506 Final Term Quiz 4 Jan 2024 by Miss Mehwish
- Type
- Final term past paper
- Course
- CS506 Web Design and Development
- Size
- PDF 1.1 MB
- Updated
- 23 Oct 2026
You get 3 free files a day on the website. Add the Chrome extensionSign in with the extension for 30 a day.
Preview text
Text from pages 1, 2, 3 of 30. Download the file for all 30 pages.
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
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
Related CS506 files
All CS506 files →- CS506 Final Term Current Paper 2020 by VUBuddy Final term PDF 464 KB
- CS506 Final Term Solved Subjective 2014 Final term DOCX 324 KB
- CS506 Final Term Solved Subjective Papers July 2012 Final term DOC 1.5 MB
- CS506 Final Term Past Papers Final term PDF 147 KB
- CS506 Highlighted Handouts by Masters Highlighted PDF 7 MB
- CS506 Quiz 3 Spring 2023 by VU Stars Quiz PDF 8.7 MB
Get more out of VUBuddy, for free
- Unlimited downloads
- The explanation behind every MCQ answer
- Study offline on slow data
- 30 downloads a day instead of 3
- Sign in and buy Pro Semester here
One Pro Semester membership works in both the extension and the app.