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
Why the concept of single thread model interface is used?
Difference between get and post in java servlets?
How a servlet is unloaded?
Hello, My project requirement is like I need to create a web page using MVC pattern. I hava a bean class, jsp page, servlet, service and dao. My jsp has two fields. One is dropdown list. The option values has to get populated from the database table. The other one is a text box and its value has to come from database table. As of now I have defined the fields in bean class, got the values from database using arraylists in dao class and I called this from service class. Can anyone please tell me the workflow of how the servlet will get this arraylist and populate the arraylist values as dropdown options in jsp page? Also I would like to know the role of bean class in MVC pattern? Thanks in advance!
How do you create a cookie using servlet?
What are the phases of a servlet life cycle?
Can we override servlet service method?
What are the disadvantages of storing session state in cookies?
What are the uses of servlets?
What is a cookie What is the difference between session and cookie
What's the architecture of a servlet package?
Explain jsessionid?
Define the lifecycle for executing a jsp page.
Explain the role of dispatcherservlet and contextloaderlistener.
What is the major difference between context parameter and context attribute?