myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dennis Byrne <den...@dbyrne.net>
Subject RE: Reading log files in JSF
Date Fri, 15 Jul 2005 16:06:22 GMT
Move the following line under the logging statement that 
prints "File is present".

return logContent.toString();

---- Original message ----
>Date: Fri, 15 Jul 2005 11:53:51 -0400
>From: "Balaji Saranathan" <balaji.saranathan@wipro.com>  
>Subject: RE: Reading log files in JSF  
>To: "'MyFaces Discussion'" <users@myfaces.apache.org>
>
>
>Something like this, but I doubt if what I do is right. I 
use Buffered
>REaders
>
>	String tempFileName =
>FacesContext.getCurrentInstance().getExternalContext
().getRequestContext
>Path()+"/"+logFileName;
>			File f = new File(tempFileName);
>			if(f.exists())
>			{
>				log.debug("File is present");
>
>			}
>			else
>			{
>				log.debug("File is not 
found");
>				return logContent.toString();
>			}
>
>
>
>-----Original Message-----
>From: Dennis Byrne [mailto:dennis@dbyrne.net] 
>Sent: Friday, July 15, 2005 11:52 AM
>To: MyFaces Discussion; balaji.saranathan@wipro.com
>Subject: Re: Reading log files in JSF
>
>
>Which API are you using to read the files?
>
>---- Original message ----
>>Date: Fri, 15 Jul 2005 10:50:51 -0400
>>From: "Balaji Saranathan" <balaji.saranathan@wipro.com>
>>Subject: Reading log files in JSF  
>>To: "'MyFaces Discussion'" <users@myfaces.apache.org>
>>
>>   Hi,
>>
>>   I'm trying to create a log viewing client in JSF.
>>   The logs files are now present under my web
>>   application. When I try to read them, I get  a
>>   FileNotFoundException. I double checked my path and
>>   the  file is present. Is there any container imposed
>>   security on accessing IO resources?
>>
>>   Will I be able to say display the log files on the
>>   Jboss server log directory from a web application
>>   running inside it?
>>
>>   Confidentiality Notice                               
>>                                                        
>>   The information contained in this electronic message 
>>   and any attachments to this message are intended     
>>   for the exclusive use of the addressee(s) and may    
>>   contain confidential or privileged information. If   
>>   you are not the intended recipient, please notify    
>>   the sender at Wipro or Mailadmin@wipro.com           
>>   immediately                                          
>>   and destroy all copies of this message and any       
>>   attachments.                                         
>Dennis Byrne
>
>
>
>
>Confidentiality Notice 
>
>The information contained in this electronic message and any 
attachments to this message are intended
>for the exclusive use of the addressee(s) and may contain 
confidential or privileged information. If
>you are not the intended recipient, please notify the sender 
at Wipro or Mailadmin@wipro.com immediately
>and destroy all copies of this message and any attachments.
Dennis Byrne

Mime
View raw message