Do you have the log4j jar on the WEB-INF/lib? Do you have the log4j.properties on the WEB-INF/classes?
You have: String str = new String(LogonAction.class.getName()); Logger logger = Logger.getLogger(str); Shouldn't it be: Logger logger = Logger.getLogger(LogonAction.class); Pedro Salgado On 05/12/2003 06:56, "Rahul Mohan" <[EMAIL PROTECTED]> wrote: > hi nick, > > thanks for responding...its the logger class thats missing ithink... > this is the exception i get when i try to view the page: > > java.lang.NoClassDefFoundError: org/apache/log4j/Logger > at app.LogonAction.perform(Unknown Source) > ........ > > what could be the problem? please excuse my novice level... > > thanks again.. > > > ----- Original Message ----- > From: "Nick Faiz" <[EMAIL PROTECTED]> > To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]> > Sent: Friday, December 05, 2003 12:22 PM > Subject: RE: Log4j with Struts > > >> Well, what class can't it find, the Logger or the LogonAction.class ? >> >> I use it with Struts, without a hassle, on WebLogic 7.2. >> >> Nick >> >> -----Original Message----- >> From: Rahul Mohan [mailto:[EMAIL PROTECTED] >> Sent: Friday, 5 December 2003 5:46 PM >> To: struts >> Subject: Log4j with Struts >> >> Hi, >> >> has anybody tried using Log4j with struts? I tried the following code >> and its giving a ClassDefNotFoundException during runtime.. >> >> this is inside the perform method: >> String str = new String(LogonAction.class.getName()); //LogonAction > is >> an Action Class >> logger = Logger.getLogger(str); //this line is throwing the > exception - >> apparently str is not having a classdef >> >> somebody please help me with this.....or is there any other method to >> perform logging? >> >> i am using tomcat4.1 ... >> >> Thanks in advance. >> >> Rahul Mohan >> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> MasterCraft Group >> Tata Consultancy Services >> Tata Research Development and Design Center >> 54B, Hadapsar Industrial Estate >> Pune - 411 013 >> Phone: +91 4042333 or 4031122 Extn 2556 >> +91 20 31544082 ( Mobile ) >> Fax: +91 20 4042399 >> email : [EMAIL PROTECTED] >> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]