Servlets Interview Questions
Questions Answers Views Company eMail

How do we call one servlet from another servlet?

582

What are the phases of servlet life cycle?

597

How to make sure a servlet is loaded at the application startup?

539

Why HttpServlet class is declared abstract?

638

Why do we have servlet filters?

590

What is the effective way to make sure all the servlets are accessible only when user has a valid session?

553

What are different methods of session management in servlets?

768

What are life cycle methods of a servlet?

579

What is URL Encoding?

609

How to handle exceptions thrown by application with another servlet?

602

How to get the IP address of client in servlet?

618

What is the difference between encodeRedirectUrl and encodeURL?

594

Why do we have servlet listeners?

589

What is difference between ServletResponse sendRedirect() and RequestDispatcher forward() method?

608

How to notify an object in session when session is invalidated or timed-out?

620


Post New Servlets Questions

Un-Answered Questions { Servlets }

What are the annotations used in servlet 3?

563


What is difference between cookies and httpsession?

538


How the typical servlet code look like ?

627


Which interface must be implemented by all servlets?

782


What is servlet and its life cycle?

556






What are the different mode that servlets can be used?

539


What are the features added in Servlet 2.5?

757


What do you mean by chaining in servlet?

559


Explain get and post.

640


What is a java servlet?

544


Why do we have servlet listeners?

589


How to get ip address in jsp login page and how to validate like 127.1.0.1 all should not be greater than 255

2907


When a client request is sent to the servlet container, how does the container choose which servlet to invoke?

563


If some new data has entered the database, explain how can a servlet refresh automatically?

723


What's the use of servletcontext?

669