How to pass a requrest object of one servlet as a request
object to another servlet?

Answer Posted / hari

Use RequestDispatcher to pass a requrest object of one
servlet as a request object to another servlet.

One way of implementing this operation ,

RequestDispatcher rD = null;
rd = request.getRequestDispatcher("xxx.jsp (or) servlet");
rD.forward(request,response);

Is This Answer Correct ?    8 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the directory structure of a war file?

878


What do you mean by filter in servlet?

711


What is servlet container. how it works?

841


Name the packages that work with servlet?

710


Why the container loads server at the application startup and how?

750






Which event is fired at the time of project deployment and undeployment?

1021


How do I know if java is running on linux?

756


How the servlet is loaded?

757


When to use doget() and when dopost()?

798


When jsessionid is created?

748


What are the functions of an intercepting filter?

683


How would you create deadlock on your servlet?

798


What is ServletContext object?

809


Explain get and post.

818


How do I support both get and post from the same servlet?

907