Web Design and Development MCQs with Answers
Practice important Web Design and Development MCQs with answers and explanations.
Multiple Choice Questions
Q401: What technology do servlets primarily improve upon?
- A: CGI programming
- B: HTML static pages
- C: JavaScript
- D: Database queries
View Answer
A
Q402: What does a servlet allow a web server to do?
- A: Generate dynamic content
- B: Store static files
- C: Execute database queries
- D: Encrypt data
View Answer
A
Q403: What is an advantage of servlets over CGI programming?
- A: Servlets use lightweight Java threads
- B: Servlets cannot handle cookies
- C: CGI starts a new process for each request
- D: Servlets require more memory
View Answer
A
Q404: Which Java API is used for handling HTTP requests in servlets?
- A: JDBC
- B: JavaMail
- C: Servlet API
- D: RMI
View Answer
C
Q405: Which environment variable specifies the root directory of the Tomcat server?
- A: JAVA_HOME
- B: CATALINA_HOME
- C: CLASSPATH
- D: TOMCAT_ROOT
View Answer
B
Q406: What should be included in the CLASSPATH variable for servlets?
- A: The path to servlet-api.jar and jsp-api.jar
- B: The path to Java source files
- C: The path to web server logs
- D: The path to JavaScript libraries
View Answer
A
Q407: What does the HTTP status code 200 indicate?
- A: Successful request
- B: Resource moved
- C: Authentication required
- D: Server error
View Answer
A
Q408: What step is involved in setting up Tomcat using the .zip file method?
- A: Set JAVA_HOME variable
- B: Download the .exe file
- C: Choose installation directory
- D: Install Java Development Kit (JDK)
View Answer
A
Q409: What is the main role of the JAVA_HOME variable in Tomcat setup?
- A: To specify the Java Development Kit location
- B: To set the Tomcat web server path
- C: To configure the web server port
- D: To define the location of servlet files
View Answer
A
Q410: Which step is NOT required when setting up Tomcat using the .exe file?
- A: Setting JAVA_HOME
- B: Setting CATALINA_HOME
- C: Setting CLASSPATH
- D: Testing the server
View Answer
A