Hi Jake,
   
  I use JSF, the servlet is embayded.
   
   
   
  > 2.
> How can the program find this file (I mean how to write in the java)?
>  

Use the Servlet API.
  servletContext.getResourceAsStream("/WEB-INF/log4j.properties");

*********************
   
  Thomas Chang wrote:
> Hi all,
>  
>   I use maven2 to build a webapp. I want to use the log4j. The
 dir-structure looks as follow:
>    
>   MyWeb/
>     /src
>        /main
>           /java
>           /res
>        /webapp
>           /WEB-INF
>    
>   Now I have two questons:
>   
> 1.
> Where should I put the "log4j.properties"? I think it should be under
 /webapp//WEB-INF?
>  

/webapp/WEB-INF/ is not in the classapth.  Therefore, Log4j will not
 find it via 
auto-configuration.  You will have to perform manual configuration to
 load this.


Jake



       
---------------------------------
Ihr erstes Fernweh? Wo gibt es den schönsten Strand. 

Reply via email to