How to pass a requrest object of one servlet as a request
object to another servlet?
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / 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 |
Answer / 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 |
if we know the any consultancies, it will place in company work through consultancy(contract base). please help me I'm 2008 pass out java candidate...
What do you mean by servlet?
What is the GenericServlet class?
What is pure servlet?
What is a generic servlet?
Why is servlet used?
Define the life cycle of a servlets.
What if we pass negative value in load-on-startup?
What is the use of httpservletrequestwrapper and httpservletresponsewrapper?
Why setMaxAge() and getMaxAge() methods are used in Cookies?
How to upload a file to the server using servlet?
i have 500 jsp in my application ,with same forward name,it lokks for appropritae jsp from 1 to 500,but i want to send response to 498 page,what should i do