give your class a properties member:
 
private Properties p;
 
then have a method like this (parameter props is name of properties file):
 
    protected boolean loadSQL(String props){  
        
        log.debug("Loading properties ("+props+")"); 
        java.io.InputStream i = null;
        try{
            p = null;
            i = this.getClass().getClassLoader().getResourceAsStream(props);
            p = new Properties();
            p.load(i);
            i.close();            
        }catch (IOException ioe){
//catch
        }
        finally {
//finally
        }     
       return true;
    }
 
 
dont know if that helps

        -----Original Message----- 
        From: Kelly Goedert [mailto:[EMAIL PROTECTED] 
        Sent: Fri 16/01/2004 17:51 
        To: Struts Users Mailing List 
        Cc: 
        Subject: sql statements
        
        

        I read somewhere that it's possible to have your sql statements on a
        .properties file, instead of a class.
        
        Could anyone give me an idea on how to do that?
        
        Thanks
        
        Kelly.
        
        
        ---------------------------------------------------------------------
        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]

Reply via email to