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

Whether we can get deadlock situation in servlets?

0 Answers  


Who is responsible for writing a constructor?

0 Answers  


What is a web application and what is it’s directory structure?

0 Answers  


how many jsp scripting elements are there and what are those?

0 Answers  


can servlet have instance variables?

8 Answers   Syscon, Wipro,






What is called Session Tracking?

0 Answers  


Name the servers that can be used to develope and deploy Servlets?

1 Answers  


How we can get ip address of client in servlet?

0 Answers  


When using servlets to build the HTML, you build a DOCTYPE line, why do you do that?

0 Answers  


What is the difference between an applet and a servlet?

15 Answers   GCEW, Miracle Solutions,


What are the jobs performed by servlets?

0 Answers  


What is called servlet container?

0 Answers  


Categories