How we can call a jsp from the servlet?



How we can call a jsp from the servlet?..

Answer / Gunjan Pandey

To call a JSP from a Servlet, you can use the RequestDispatcher's `forward()` method. Here's an example:nn```javanrequest.getRequestDispatcher("/path_to_your_jsp").forward(request, response);```

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Servlets Interview Questions

What is Servlets and explain the advantages of Servlet life cycle?

1 Answers  


How many ways are available to ger RequestDispatcher object?

4 Answers   Polaris,


how a user session can be tracked in servlets?

1 Answers  


how the HTML data stored in web server?

1 Answers   TCS,


In which cases Destroy() is invoked?

2 Answers  


Describe servlet?

1 Answers  


How can you create a session in servlet?

1 Answers  


What are some disadvantages of storing session state in cookies?

1 Answers  


What is done after deploying a war file and before client gives a request

2 Answers   Bosch,


What is the importance of init() method in Servlet ?

1 Answers   BirlaSoft,


What methods do we use in Servlet to Applet communication?

3 Answers   Infosys,


What is the difference between a generic servlet and http servlet?

1 Answers  


Categories