I am trying to send response in form of an .xml file from a Java servlet to the client. For that I have written the code below:
if (result) {
response.setContentType("text/xml");
PrintWriter out = response.getWriter();
out.println("<Login>");
out.println("<status>"+successStatus+"</status>");
out.println("<username>"+userDTO.getFirstname()+"</username>");
out.println("<sessionId>"+hSession.getId()+"</sessionId>");
out.println("<timestamp>"+hSession.getLastAccessedTime()+"</timestamp>");
out.println("<timeout>"+hSession.getLastAccessedTime()+"</timeout>");
out.println("</Login>");
}
How can I check on the client whether I get this response or not? Do I need to send the response explicitly or is the above code sufficient to send the response to the client?
Thanks in advance