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
If some new data has entered the database, explain how can a servlet refresh automatically?
What are the functions of the servlet container?
What is http servlet in java?
How can we implement a jsp page?
Can we refresh servlet in client and server side automatically?
How do I use cookies to store session state on the client?
How do you deal property files in servlet?
What exactly are the functions of servlet?
Write a command to get actual path of a servlet to the server?
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's the difference between authentication and authorization?
How to find whether a parameter exists in the request object?
Why is httpservlet declared abstract?
What are the types of an http request?
Why servlet is faster than jsp?