How to debug a servlet?

Answers were Sorted based on User's Feedback



How to debug a servlet?..

Answer / niranjanravi

through servletloginfo()

Is This Answer Correct ?    2 Yes 1 No

How to debug a servlet?..

Answer / madhusudhakar

res.setContentType("text/html");
ServletOutputStream out = res.getOutputStream();
try {
// do your thing here
...
}
catch (Exception e) {
StringWriter sw = new StringWriter();
PrintWriter pw = new PrintWriter(sw);
e.printStackTrace(pw);
out.println("

");
out.print(sw.toString());
out.println("

");
}

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Servlets Interview Questions

How can we include static files in the jsp page?

0 Answers  


What is called servlet container?

0 Answers  


How can we invoke another servlet in a different application?

0 Answers  


What is getservletcontext?

0 Answers  


What are setComment and getComment methods in Cookies?

2 Answers  






What is called Session Tracking?

0 Answers  


waht is the main diference b/w servelts and JSP ?

8 Answers   CAP, HCL,


Define context initialization parameters.

0 Answers  


What is URL Rewriting ?

2 Answers  


where the session data will stored?

4 Answers  


how to make the IP address to .com

1 Answers   iGate,


Explain the steps involved in placing a servlet within a package?

0 Answers  


Categories