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

Answer Posted / priya

in an any web application when we have to pass object from
one servlet to another then we use request dispatcher.the
request dispatcher is used by using request.setAttribute
("key",value) in the first servlet and request.getAttribute
("key")in the second servlet.

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the need of session tracking in web application?

586


What methodology can be followed to store more number of objects in a remote server?

1822


What are some disadvantages of storing session state in cookies?

593


Why doesn’t a servlet include main()?

563


How do we share data using 'getservletcontext ()?

543






Explain Action Servlet?

627


What is load-on-startup in servlet?

589


What are the steps involved in placing a servlet within a package?

593


Is tomcat a servlet container?

580


Explain is servlet mapping?

586


Explain how to improve Servlet Performance?

602


How do you invoke a servelt?

630


List out difference between a JavaBean from a Servlet?

568


Which are the different ways you can communicate between servlets?

532


How would you create deadlock on your servlet?

627