Web Design and Development MCQs with Answers
Practice important Web Design and Development MCQs with answers and explanations.
Multiple Choice Questions
Q651: How do you include JSTL in a JSP page when using Expression Language (EL)?
- A: <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
- B: <%@ taglib prefix="c_rt" uri="http://java.sun.com/jsp/jstl/core_rt" %>
- C: <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
- D: <%@ taglib prefix="sql" uri="http://java.sun.com/jsp/jstl/sql" %>
View Answer
A
Q652: What is the purpose of the c
- A: To set or update variables
- B: To display the value of an expression
- C: To remove a variable
- D: To iterate over a collection
View Answer
B
Q653: How can you iterate over a collection using c
- A: Use the items attribute
- B: Use the var attribute
- C: Use the end attribute
- D: Use the scope attribute
View Answer
A
Q654: What is the default scope of a variable created using the c
- A: request
- B: page
- C: session
- D: application
View Answer
B
Q655: What is the purpose of client-side validation?
- A: Saves time and bandwidth
- B: Makes form submission faster
- C: Reduces server load
- D: Increases form complexity
View Answer
A
Q656: Which scripting language is commonly used for client-side validation?
- A: JavaScript
- B: VBScript
- C: Python
- D: Ruby
View Answer
A
Q657: What happens if the name field is left empty in the provided JavaScript validation example?
- A: Form is submitted
- B: An alert is displayed
- C: Form is cleared
- D: Page reloads
View Answer
B
Q658: In JavaScript validation, how is a negative age value handled in the example provided?
- A: Allowed
- B: Ignored
- C: An alert is displayed
- D: Value is converted to positive
View Answer
C
Q659: Which framework simplifies building user interfaces for web applications according to the content?
- A: Struts
- B: JavaServer Faces (JSF)
- C: Tapestry
- D: Swing
View Answer
B
Q660: What is a disadvantage of the Struts framework mentioned in the content?
- A: It lacks UI tags
- B: It is too simple
- C: It is not Java programmer-centric
- D: It is not open-source
View Answer
A