Iam having these to servlets, what iam doing is to try to include the output of another servlet into my servlet.
FirstServlet : In which the output of SecondServlet is to be included.
1. what do the request and response objects contain in the rd.include(request,response); i tried request.toString() and response.toString(). though am sure that request is obviously the GET request for the first servlet but dont know what the response object contains.
2.Iam not able to understand the way we sent request parameters. like " ?myname=aashima",i mean it is the path ,so can we just pass the information as a
query string appended to the destination URL.
3.and am sorry about the weirdest confusion. what does the response.setContentType("text/html") do. i mean in the second servlet when we write
out.println(attribute+ ":" + request.getAttribute(attribute)+"<BR>"); we have no opening tags (out.println("<html">) and likewise no closing tags. so we can use it this way?
i have just started the preparation so my basics are not clear but am trying. would be great if you guys help