WT Question Bank Unit 4 & Unit 5
WT Question Bank Unit 4 & Unit 5
Session 2024-25
Unit-4
1. Explain the concept of JavaBeans in detail. What are its advantages, and how is it different
from regular Java classes?
2. What are JavaBean properties? Explain the different types of properties with examples.
3. Discuss the various types of Enterprise Java Beans. Compare their features and use cases.
4. What are the key features of Enterprise Java Beans that make them suitable for enterprise-level
applications?
5. What are the major challenges in implementing EJBs, and how can they be addressed
effectively?
Node.js
6. What is Node.js? Discuss its architecture and highlight its advantages over traditional server-side
frameworks.
7. Explain the steps for setting up a Node.js environment. Include all necessary tools and
configurations.
8. What is the REPL Terminal in Node.js? Demonstrate its key functionalities with examples.
9. Explain the role of the Node Package Manager (NPM) in Node.js development. How can
dependencies be managed using NPM?
10. Discuss the concept of callbacks in Node.js. What are the potential drawbacks of callback
functions, and how can they be mitigated?
11. What are events in Node.js? Explain the event-driven model and how it is implemented using the
EventEmitter class.
12. Explain how RESTful APIs can be created using Node.js and Express Framework. Provide a
detailed example.
13. Compare and contrast Node.js with traditional web servers like Apache. Highlight the scenarios
where Node.js is more suitable.
14. How can a MongoDB database be created using Node.js? Write the code and explain the steps
involved.
15. Discuss the process of creating collections in MongoDB using Node.js. Provide a detailed
example.
16. Explain how documents can be inserted, updated, and deleted in MongoDB using Node.js. Include
code snippets for all operations.
17. What are MongoDB queries? Demonstrate how to perform sorting, filtering, and aggregation
queries using Node.js.
18. Explain the concept of joining collections in MongoDB using Node.js. Provide an example to
illustrate its importance.
19. How is data retrieved from MongoDB using Node.js? Illustrate with examples of various query
options.
20. Explain the steps involved in connecting a Node.js application to a MongoDB database.
Unit-5
Servlets
1. What is a Servlet? Discuss the architecture of Servlets and explain their role in web applications.
2. Explain the Servlet interface and describe the methods it defines. How does it form the backbone
of servlet implementation?
3. Discuss the Servlet lifecycle in detail. Explain the role of each lifecycle method with an example.
4. How are HTTP GET requests handled in Servlets? Write a detailed example and explain the
process.
5. Explain how HTTP POST requests are processed by Servlets. Provide an example to demonstrate
the implementation.
6. What is request redirection in Servlets? Explain the difference between RequestDispatcher and
sendRedirect with examples.
7. What are cookies in the context of Servlets? Discuss how cookies can be used for session tracking
with examples.
8. What is session tracking? Discuss the different techniques available in Servlets for session
tracking.
9. Explain session tracking using the HttpSession interface. Provide an example demonstrating how
to store and retrieve session attributes.
10. Compare and contrast doGet() and doPost() methods in Servlets. Highlight the scenarios where
each should be used.
Java Server Pages (JSP)
11. What is JSP? Discuss the advantages of JSP over Servlets and its role in simplifying web
application development.
12. Explain the lifecycle of a JSP page. How is it different from the lifecycle of a Servlet?
13. Write a detailed example of your first JSP page and explain its structure. Include the deployment
steps.
14. What are implicit objects in JSP? Discuss the purpose and usage of at least five implicit objects
with examples.
15. Explain the concept of scripting elements in JSP. Describe the three types of scripting elements
with examples.
16. What are directives in JSP? Discuss the three main types of directives (page, include, taglib) and
their significance.
17. Discuss standard actions in JSP. Explain the purpose of common actions like <jsp:include> and
<jsp:forward> with examples.
18. What are custom tags in JSP? Explain the process of creating and using custom tags with a
practical example.
19. Compare and contrast JSP and Servlets. Highlight their roles in Java-based web applications.
20. Discuss the role of tag libraries in JSP. Explain the importance of the JSP Standard Tag Library
(JSTL) and its components.