Hi

I'm developing an app with Tomcat 5.5 and am trying to add logging to it.
I've tried lots of things and none seem to work:

I have code like:

import java.sql.Connection;
import java.sql.SQLException;
import java.sql.Statement;

import javax.naming.Context;
import javax.naming.InitialContext;
import javax.sql.DataSource;

import org.apache.log4j.Logger;

public class DBConnectivity
{

org.apache.log4j.Logger logger = Logger.getLogger(myapp.DBConnectivity.class);
//also tried org.apache.log4j.Logger logger = Logger.getLogger("MyApp");
   logger.error("Hello");

Eclipse reports an error for the .error line - saying:

Syntax error on token "Hello" - delete this token
Syntax error on token(s) misplaced contructs.



The jars in WEB-INF\lib are:

commons-beanutils-1.7.0.jar
commons-codec-1.3.jar
commons-collections-3.1.jar
commons-digester-1.7.jar
commons-el-1.0.jar
commons-fileupload-1.0.jar
commons-io-1.1.jar
commons-lang-2.1.jar
commons-logging-1.1.jar
jstl-1.1.0.jar
log4j-1.2.14.jar
myfaces-api-1.1.4.jar
myfaces-impl-1.1.4.jar
mysql-connector-java-5.0.4-bin.jar
standard-1.1.2.jar
tomahawk-1.1.3.jar

As you can see it is an initial stab at a faces app - is this anything to do with the prob?

Any help greatfully recieved

Chris


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to