Hi, Petr: Thanks, but you misunderstood the problem (may be my fault). The problem is that the component - which doesn't have the .java source - uses this parameter. Yes, I think they use > ins = getClass().getClassLoader().getResourceAsStream(path); It's OK but the problem is that I can't change the component's code. [freesrc vs "component based off-the-self" etc etc] The reason I'm asking for help is to put this parameter somehow to somewhere in the app's config files, so the customer doesn't have to care about orion's starting parameters after [s]he deployed the app. Of course it's working with java -Doption=value -jar orion.jar BR, Adam > -----Original Message----- > From: Petr Podsednik > To: Orion-Interest > Subject: Re: Where to put application parameters? > > > Try this: > > String path = "your-relative-path.xml" > InputStream ins= null; > try { > ins = getClass().getClassLoader().getResourceAsStream(path); > } > catch (Throwable ex) { > com.amaio.util.sys.prn("Error getting XML resource"+ex); > } > > ----- Original Message ----- > From: Toth [@FREEMAIL], Adam (E-mail) <[EMAIL PROTECTED]> > To: Orion-Interest <[EMAIL PROTECTED]> > Sent: Thursday, April 05, 2001 5:12 PM > Subject: Where to put application parameters? > > > > Hi, > > > > We're using a component in our sw, and that needs a config XML file. > > The following method is used currently: > > > > java -Dsomeparam=path-to.xml -jar orion.jar > > > > We don't have to source, and it's working ok > > > > I''ve tried to put this into web-inf/web.xml (into EAR in > WAR of course) > > like this: > > [..] > > <web-app> > > > > <context-param> > > <param-name>someparam</param-name> > > <param-value>path-to.xml</param-value> > > </context-param> > > [..] > > > > But it's not working. We're using absolute pathnames on WinNT > > (like C:\dir\dir2\this.xml). so it's not a problem of "where is this > > relative filename starts" > > > > Does anybody know how to solve this? It's not very elegant > to deploy an > app > > an use -D options, I think, is it. > > > > It would be nice to take a look at a working solution or hear some > comments > > on this. > > > > Thank you in advance, > > Adam > > > > >
RE: Where to put application parameters?
Toth [EMAIL PROTECTED], Adam \(E-mail\) Fri, 06 Apr 2001 02:31:24 -0700
- [RE].. ±èÀºÁÖ
- RE: [RE].. elephantwalker
- RE: [RE].. Kemp Randy-W18971
- Where to put application ... Toth [EMAIL PROTECTED], Adam \(E-mail\)
- Re: Where to put appl... Petr Podsednik
- RE: Where to put ... Toth [EMAIL PROTECTED], Adam \(E-mail\)
- RE: Where to put ... Peter Neil
- Error : Interbase... Peter Nordlund
- RE: Error : ... Randahl Fink Isaksen
- Re: [RE].. Kanbay Saravanan
- RE: [RE].. Kemp Randy-W18971