Can
Code: Select all
request.GetRequestDispatcher(String)
Thanks
Moderator: admin
Code: Select all
request.GetRequestDispatcher(String)
What you write to the response is totally up to you. But in practice, it depends on what content you are generating. For example, most of the time, you generate HTML content, which is displayed by the browser. So if you do not generate correct or proper HTML data (such as not including <html> or <body> tag, the servlet container will not complain because it doesn't care what you generate. But the browser may not display the page correctly or as you expected.Guest wrote:Can I still write to response even if the opening tags for <html><body> are not there?
What should be the output of the foll code?
PrintWriter out = response.getWriter();
out.println("<br>Page 2</body></html>");
Users browsing this forum: No registered users and 2 guests