M
Mikey
I am new to servlets and I have a question about viewing the response
source code on my browser. I'm not sure if this is a problem with my
response headers or what.
My servlet creates a response and sends it back to the browser where it
is displayed correctly. However, when I attempt to view the source code
in the browser (both IE and Netscape) the display is blank.
The servlet code is:
res.setContentType("text/html");
PrintWriter out = res.getWriter();
out.println("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 " +
"Transitional//EN\">\n" +
"<HTML>\n" +
"<HEAD><TITLE>Submit Experiment
Results</TITLE></HEAD>\n" +
"<BODY>\n" +
"<br><br><br><br><center>\n" +
"<H2>Experimental Results Recorded</H2>\n" +
"<table border=\"1\" width=\"500\" cellpadding=\"10\"
cellspacing=\"0\"><tr><td>" +
"<H3>Your submitted data have been recorded. You can
either proceed to having your results gradded or click the \"Back\"
button on your browser to again review your data.</H3>\n" +
"</td></tr>" +
"<tr><td>" +
"<H3>After you have clicked the \"Grade Results\"
button, an email with your score will be sent to both you and your
instructor.</H3>\n" +
"</td></tr></table>" +
"</center></BODY></HTML>");
As I develop the servlet code I would like to be able to view the
received html file on the browser for debugging purposes.
Any help would be appreciated.
Thanks.
source code on my browser. I'm not sure if this is a problem with my
response headers or what.
My servlet creates a response and sends it back to the browser where it
is displayed correctly. However, when I attempt to view the source code
in the browser (both IE and Netscape) the display is blank.
The servlet code is:
res.setContentType("text/html");
PrintWriter out = res.getWriter();
out.println("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 " +
"Transitional//EN\">\n" +
"<HTML>\n" +
"<HEAD><TITLE>Submit Experiment
Results</TITLE></HEAD>\n" +
"<BODY>\n" +
"<br><br><br><br><center>\n" +
"<H2>Experimental Results Recorded</H2>\n" +
"<table border=\"1\" width=\"500\" cellpadding=\"10\"
cellspacing=\"0\"><tr><td>" +
"<H3>Your submitted data have been recorded. You can
either proceed to having your results gradded or click the \"Back\"
button on your browser to again review your data.</H3>\n" +
"</td></tr>" +
"<tr><td>" +
"<H3>After you have clicked the \"Grade Results\"
button, an email with your score will be sent to both you and your
instructor.</H3>\n" +
"</td></tr></table>" +
"</center></BODY></HTML>");
As I develop the servlet code I would like to be able to view the
received html file on the browser for debugging purposes.
Any help would be appreciated.
Thanks.