Re: Re: Dods standalone program (Vladimir Ritz Bossicard)

Vladimir Ritz Bossicard <[email protected]> Wed, 26 Nov 2003 08:52:46 -0800 (PST)
Newsgroups gmane.comp.java.enhydra.general
Message-ID <[email protected]>
> Still the same message: JVM can not find neither DODS
> HOME nor ENHYDRA HOME!

what I do is a HUGE hack.  But it works:

1) set the dods home location in a property of the servlet (web.xml file)

  <servlet>
    <servlet-name>ApplicationGateway</servlet-name>

    <init-param>
      <param-name>DodsHome</param-name>
      <param-value>/opt/java/install/dods-5.1</param-value>
    </init-param>

    <init-param>
      <param-name>DodsConfig</param-name>
      <param-value>/home/vladimir/proto/test/config/dods.conf</param-value>
    </init-param>

2) in your servlet initialization code:

  System.setProperty("DODS_HOME", config.getInitParameter("DodsHome"));
  DODS.startup(config.getInitParameter("DodsConfig"));

I won't say that it's a nice solution, but it does the job.

hth

-Vladimir


=====
Vladimir Ritz Bossicard
www.bossicard.com

__________________________________
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/