Assignment 5
Assignment 5
Q.
Question
No.
Explain the life cycle of a Servlet with a suitable diagram and discuss how doGet() and doPost()
1
methods handle HTTP requests.
Write and explain a complete Java Server Page (JSP) program that includes the use of implicit
2
objects, standard actions, and directives.
Compare and contrast session tracking using cookies and HttpSession with suitable code
3
snippets and scenarios.
4 Discuss custom tag libraries in JSP. Explain how to create and use them with an example.
How do you redirect a request to another resource in JSP and Servlets? Explain with code and
5
differentiate between sendRedirect() and forward().
Q.
Question
No.
1 Explain the life cycle of a Servlet with appropriate methods and diagram.
Write a complete JSP page that uses directives, implicit objects, and standard actions. Explain
2
the functionality of each part.
How can you manage session tracking using Cookies and HttpSession? Illustrate with
4
examples.
Discuss the steps to create and use a custom tag library in JSP. Write a simple custom tag
5
example.
Explain implicit objects in JSP. How are they used in web application development? Provide
6
examples.
Design a web application that handles both GET and POST requests using Servlets. Explain the
7
code.
8 Differentiate between JSP and Servlet. Discuss their use-cases with examples.
9 Explain session management in JSP with a real-time example using HttpSession and isNew()
Q.
Question
No.
method.
Describe the use of JSP directives (page, include, taglib). Write examples to show how they are
10
used.
Q. No. Question
3 What are JSP standard actions? Describe any three with examples.
5 Describe how a servlet handles HTTP POST requests using doPost() method.
6 What are JSP directives? Explain page and include directives with syntax.
8 What are cookies in JSP? How are they used for session tracking?
10 Explain the purpose of the service() method in the servlet life cycle.
Q.
Question
No.
Explain the life cycle of a Servlet with a labeled diagram. Write how doGet() and doPost()
1
methods are used.
Create a complete JSP program that demonstrates use of directives, implicit objects, and
2
standard actions.
3 How is session tracking handled using cookies and HttpSession in JSP? Compare both with
Q.
Question
No.
examples.
Develop a servlet-based web application that handles user login using doPost() and session
5
tracking.
6 Describe all implicit objects in JSP. Give their role and examples of usage.
Explain NPM (Node Package Manager). How does it help in managing packages in Node.js?
8
Provide use cases.
9 Build a Node.js RESTful API using Express Framework and explain the code flow.
10 Describe the concept of callbacks and events in Node.js with code examples.
Explain how to create a MongoDB database and perform insert, delete, and update
11
operations using Node.js.
12 Illustrate how Express.js and MongoDB can be integrated in a simple CRUD application.
13 Define JavaBeans. How are properties defined in JavaBeans? Explain with an example.
14 Compare Stateless, Stateful, and Entity beans. Provide an example use case for each.
15 Describe the process of creating a Stateful Session Bean. Explain its life cycle.
Q. No. Question
2 What are JSP directives? Explain page and include directives with examples.
10 What are the basic CRUD operations in MongoDB? Name the functions used.