how to print error on brower in servlets
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   nor1_leelapattana
Posted On:   Tuesday, August 20, 2002 12:40 AM

catch (Exception e)
{
// This will show up in logs when
// ncf.jvm.stdoutlog.enabled=true in jvm.properties
e.printStackTrace();
// this will print error on server console
}


i want print error on brower
how to ?

Re: how to print error on brower in servlets

Posted By:   Eelco_Cramer  
Posted On:   Tuesday, August 20, 2002 04:32 AM


catch (Exception e) {
// This will show up in logs when //
ncf.jvm.stdoutlog.enabled=true in jvm.properties
e.printStackTrace()
// this will print error on server console


PrintWriter pw = response.getWriter();
e.printStackTrace(pw);
pw.close();
// this will print the error to your browser.

}
About | Sitemap | Contact