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

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

1 Answers  


What is the difference between servlet config and servlet context.

19 Answers   TCS, Tech Mahindra, Vertex,


Explain in brief the directory structure of a web application?

1 Answers  


Explain the lifecycle of a servlet?

1 Answers  


Can we override the ActionServlet?

3 Answers   ArisGlobal, HCL, PPF,


What are its drawbacks of cgi?

1 Answers  


Explain load on start-up and its importance?

1 Answers  


What is webservlet?

1 Answers  


Why is servlet used?

1 Answers  


Can a servlet be called by passing its name as a parameter in the URL?

1 Answers   iFlex,


Describe in brief RequestDespatcher?

1 Answers   Tech Mahindra,


i have 500 jsp in my application ,with same forward name,it lokks for appropritae jsp from 1 to 500,but i want to send response to 498 page,what should i do

2 Answers   Caritor, Globerian,


Categories