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

What is session?

0 Answers  


What are the two important api's in for servlets?

0 Answers  


Which event is fired at the time of project deployment and undeployment?

0 Answers  


what is the difference between?when we write the code in following manner? class One extends httpservlet { } and class One extends genericservlet { }

4 Answers  


How is an application exception handling is done using a servlet?

0 Answers  






What do you mean by web applications?

0 Answers  


What are the objects involved when a servlet receives a call from client?

0 Answers  


Why session tracking is needed?

0 Answers  


Define the lifecycle for executing a jsp page.

0 Answers  


What is http servlet?

0 Answers  


hi actully i hav form columns with origin and destination names .as like as i need to create one more column with name amount. my requirement is when i select origin and destination columns automatically i need to get amount from database.how can i. please tel me with relative code

0 Answers   CTS,


why are using HttpServlet in realtime projects and why are not using Genericservlet

2 Answers  


Categories