Log file
Hi
Can Anyone help me with creation of log files. I am writing an application that uses JSP and Beans. It also connects to the database. I would like to know the status of the program by writing all information to the log. what are the things that i need to do for it.
Thanks for the help
Sandeep
[336 byte] By [
anu_code] at [2007-9-26 1:37:38]

Hi,
The following example code shows how a servlet uses the host server to write a message to a servlet log when it initializes:
private ServletConfig config;
public void init(ServletConfig config) {
// Store config in an instance variable
this.config = config;
ServletContext sc = config.getServletContext();
sc.log( "Started OK!" );
Also please refer this URL.
http://java.sun.com/products/servlet/2.1/api/javax.servlet.ServletContext.html#log
Thanks
Bakrudeen
}
Also please refer this URL.