tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Herchel Wojciech <W.Herc...@pzuzycie.com.pl>
Subject ODP: log() ?
Date Wed, 28 Feb 2001 07:41:44 GMT
declare private ServletContext sc, make your init(ServletConfig config)
method look like this:
public void init(ServletConfig config) throws ServletException {
 	
 this.config=config;
 sc = config.getServletContext();
	
 }

then sc.log("blalblalbla"); would do the trick


vVolf


> -----Oryginalna wiadomooeæ-----
> Od: Shahed Ali [mailto:shahed@enoor.com]
> Wys³ano: 27 lutego 2001 22:20
> Do: tomcat-user@jakarta.apache.org
> Temat: log() ?
> 
> 
> Sorry for this stupid question,
> but how do I use the log() method in servlets ?
> 
> In JSP application.log() seems to work,
> but in servlets, I tried getServletContext().log("adad") etc and 
> I keep getting NullPointerExceptions
> 
> Thanks
> Shahed
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, email: tomcat-user-help@jakarta.apache.org
> 

Mime
View raw message