0% found this document useful (0 votes)
6 views4 pages

Assignment 5

The document consists of a series of questions related to Java Server Pages (JSP), Servlets, and Node.js, covering topics such as the life cycle of a Servlet, session tracking, custom tag libraries, and the differences between JSP and Servlets. It also includes questions on Node.js concepts like callbacks, events, and CRUD operations with MongoDB. Additionally, it addresses the use of implicit objects and standard actions in JSP, as well as the role of NPM in managing Node.js packages.

Uploaded by

er.devanshpathak
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views4 pages

Assignment 5

The document consists of a series of questions related to Java Server Pages (JSP), Servlets, and Node.js, covering topics such as the life cycle of a Servlet, session tracking, custom tag libraries, and the differences between JSP and Servlets. It also includes questions on Node.js concepts like callbacks, events, and CRUD operations with MongoDB. Additionally, it addresses the use of implicit objects and standard actions in JSP, as well as the role of NPM in managing Node.js packages.

Uploaded by

er.devanshpathak
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

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.

3 Compare sendRedirect() and forward() in JSP. Demonstrate both with examples.

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

1 What is JSP? How does it differ from a static HTML page?

2 List and explain four implicit objects in JSP.

3 What are JSP standard actions? Describe any three with examples.

4 What is a servlet interface? Name its methods.

5 Describe how a servlet handles HTTP POST requests using doPost() method.

6 What are JSP directives? Explain page and include directives with syntax.

7 How is redirection of a request done in JSP? Mention the syntax.

8 What are cookies in JSP? How are they used for session tracking?

9 Differentiate between doGet() and doPost() methods in servlets.

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.

4 Explain step-by-step creation and use of custom tag libraries in JSP.

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.

7 Compare and contrast JSP and Servlets with suitable examples.

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

1 What is JSP? Write its advantages over Servlets.

2 What are JSP directives? Explain page and include directives with examples.

3 What is a standard action in JSP? Explain any two.

4 List and explain any four implicit objects in JSP.

5 What is the service() method in Servlet? When is it called?


Q. No. Question

6 Explain the use of sendRedirect() and forward() in Servlets.

7 What is Node.js? List its key features.

8 How do you install Node.js and verify it using REPL Terminal?

9 What are events in Node.js? Give an example using EventEmitter.

10 What are the basic CRUD operations in MongoDB? Name the functions used.

11 Write a short note on Express.js. Why is it preferred over plain Node.js?

12 What is a JavaBean? Write syntax to define properties.

13 Define Stateless Session Bean. Where is it used?

14 What is the role of NPM in Node.js project development?

15 Write the syntax to create a collection in MongoDB using Node.js.

You might also like