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

Why is httpservlet declared abstract?

766


What is the purpose of inter-servlet communication?

773


Does servlet have main method?

875


Explain url encoding?

710


What are the jobs performed by servlets?

751






How forward () method is different from send redirect () method?

691


Can you send an authentication error from a servlet?

688


What are the common methods that are included in the http servlet class?

761


Define the servlet mapping.

695


How to rectify errors in java servlet while compilation?

677


How do you create a cookie using servlet?

800


What is servlet and its life cycle?

781


Explain the features are in servlet 3?

783


What are the functions of Servlet container?

789


Write all the phases defined in servlet life cycle?

735