Answer Posted / 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 View All Answers
How to create war file?
Hi frnd can i any one kindly can post for me portlet,hibernate and spring example application and with flow explantion configuration using Jdeveloper.and related links ar tutorials kindly please send me .its urgent for me .thanks in advance...........else can any one send to kondaiah.goddeti@gmail.com
What is java servlet session?
What’s the use of the servlet wrapper classes??
How would you create deadlock on your servlet?
What do you mean by httpservlet and how it is different from the genericservlet?
What is servlet instance?
How will you pass values from HTML page to the servlet?
What is the type of method for sending request from http server?
What is servlet interface?
Elucidate servlet attributes and its scope?
What is servlet collaboration?
What is the difference between 2 types of servlets?
What is meant by Servlet? What are the parameters of service method?
What is meant by a web application