Thanks Nathan, Larry and Tony,

 

I moved the config files to within the classes and then used Resources. Its working now J

 

Thanks a million!

 

(PS: I just want to say that I really think this is a great group. The attitude of the developers is very helpful. Looking at the emails exchanged here makes me glad that we chose iBatis. I can be sure that my questions will be answered :) )

 

Regards

~Rashmi


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, January 31, 2006 2:39 AM
To: [email protected]
Subject: Re: iBatis and Tomcat

 

Rashmi,

 

Not sure how you are using the Resources class but this has always worked for us in many many webapps.

 

public class DaoConfig {

    private static Log log = LogFactory.getLog(DaoConfig.class);

    private static final DaoManager daoManager;

    private static final String resource = "scorecard/dao/dao.xml";

    private static Reader reader;

 

    static {

        try {

            reader = Resources.getResourceAsReader(resource);

        } catch (IOException e) {

            log.error(e, e);

        }

 

        daoManager = DaoManagerBuilder.buildDaoManager(reader);

    }

 

    /**

     * Get the instance of the DaoManager object

     * @return DaoManager

     */

    public static DaoManager getDaoManager() {

        return daoManager;

    }

}

 

 

On Jan 30, 2006, at 9:44 AM, Rashmi Dave wrote:



Hi All,

 

My question might not relate completely with an iBATIS problem, however, I am a little desperate and would really appreciate some help.

 

I have an application which I am deploying as a WAR onto a tomcat 5.5 server. The application contains a daoConfig and an SQLMapConfig. The WAR file looks like

 

App.war =

-          screens (containing jsp pages)

-oo

Reply via email to