- Type
- Quiz
- Course
- CS506 Web Design and Development
- Size
- PDF 916 KB
- 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 2, 3, 4 of 55. Download the file for all 55 pages.
How does URL rewriting work in Java web applications?
A. Appending session ID as a query parameter to the URL. B. Modifying the URL in the client's browser using JavaScript. C. Replacing URL paths with user-friendly aliases. D. Storing session ID in cookies.
Which of the following is the correct format of writing a taglib directive in JSP? A. <% taglib {attribute=”val”} %> B. <%! taglib {attribute=”val”} %> C. <%# taglib {attribute=”val”} %> D.
<%$ taglib {attribute=”val”} %>
The business layer in Java applications is responsible for: A. Managing the application's database connectivity B. C. Handling user interface rendering and event handling D.
Implementing business logic and processing rules
Which of the following is the correct format of writing an include directive in JSP? A. <%$ include {attribute=”val”} %> B. <%# include {attribute=”val”} %> C.
<% include {attribute=”val”} %>
D. <%! include {attribute=”val”} %>
HTML comments are ____________ in browser and JSP comments are ________________ in browser. A. shown, shown B. shown, hidden C.
hidden, shown
D. hidden, hidden
Which of the following is responsible for handling user interactions and displaying data in a Java application?
A.
Presentation layer
B. Persistence layer C. Business layer D. Data layer HttpServletResponse provides ________ methods to perform encoding in java. A. One
B. Two Page 317
C. Four D. Three
What is a package in Java?
A. A group of classes with similar functionality. B. A folder or directory that organizes related classes and interfaces. C. A collection of methods for a specific task. D. A set of variables used in a program.
Which method is used to encode a URL for URL rewriting in Java Servlets? A. session.encodeURL(String url) B.
response.encodeURL(String url)
C. request.encodeURL(String url) D. context.encodeURL(String url)
Which session tracking technique appends the session ID as a query parameter in the URL?
A. Cookies B. C. D.
Which directive is used to import Java classes in JSP?
A. B. <scriptlet> C. <include> D.
<import>
How does JSP differ from servlets?
A. JSP is written in Java, while servlets are written in JavaScript. B. JSP is executed on the server and generates dynamic content, while servlets handle requests and responses. C. JSP allows for a mixture of HTML and Java code, while servlets are purely Java code. D. JSP is used for client-side interactions, while servlets handle server-side operations.
How do you set the maximum age of a Cookie object in Java? A. myCookie.setAge(3600); B.
myCookie.setMaxAge(3600);
C. myCookie.setMaxAgeInSeconds(3600); D. myCookie.setExpiration(3600);
The data layer in Java applications is responsible for: A. Presenting data to the user in a user-friendly format B. C. Handling user input validation and error handling D. Handling user authentication and authorization
The method "cookie.setMaxAge(12)" indicates that the cookie will expire after
A. 12 Days B.
12 Seconds
C. 12 Hours D. 12 Minutes
Which of the following is the correct method of HttpServletResponse to perform encoding in java?
A. String encodeRedirect(String URL) B. String encodeMineURL(String URL) C. String RedirectURL(String URL) D.
String encodeRedirectURL(String URL)
What is the correct syntax to create a Cookie object in Java? A. Cookie myCookie = createCookie("name", "value"); B.
Cookie myCookie = new Cookie("name", "value");
C. Cookie myCookie = Cookie.createCookie(); D. Cookie myCookie = new Cookie();
Related CS506 files
All CS506 files →- CS506 Handouts by VUBuddy Handout PDF 6.2 MB
- CS506 Final Term Solved Papers 5 by Waqar Siddhu Final term PDF 2.9 MB
- CS506 Quiz 3 Set 2 by VU Topper RM Quiz PDF 838 KB
- CS506 Solved Grand Quiz 2021 by Sonu Ilyas Quiz PDF 5 MB
- CS506 Solved Grand Quiz Spring 2021 by Riz Mughal Quiz PDF 912 KB
- CS506 Solved Grand Quiz 2020 by Sonu Ilyas Quiz PDF 4.5 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.