How to pass a requrest object of one servlet as a request
object to another servlet?
Answer Posted / ravikiran(aptech mumbai)
using request.setAttribute("key",value) in the first servlet
and request.getAttribute("key") in the second servlet
Is This Answer Correct ? | 5 Yes | 3 No |
Post New Answer View All Answers
Why the concept of single thread model interface is used?
Explain the differences between jsp and servlet.
What’s the use of the servlet wrapper classes??
What is the effective way to make sure all the servlets are accessible only when user has a valid session?
How can we refresh automatically when new data has entered the database?
Why doesn’t a servlet include main()? How does it work?
Describe some assignments that are executed by servlet container?
What is the use of httpservletrequestwrapper and httpservletresponsewrapper?
What is the use of httpservletresponsewrapper?
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!
What is servlet container?
Define the lifecycle for executing a jsp page.
What is the difference between get and post methods?
If servlet receives multiple requests, how many objects will it create?
Why is a constructor needed in a servlet even if we use the init method?