You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Asaf Lahav <as...@primagrid.com> on 2006/05/08 11:29:39 UTC
Application Configuration
Hi all,
I'm building a web services application that requires configuration xml
files.
Is there a location where I should put the xml configuration files?
Is there a best practice saying where to put configuration files?
If there is, how am I expected to get the configuration info from there?
Thanks in advance,
Asaf Lahav
VP R&D, Prima Grid LTD.
Cellular: 972-54-4717955
Phone: 972-3-6540255
Fax: 972-3-6540254
Re: Application Configuration
Posted by Mark Thomas <ma...@apache.org>.
Mark Petrovic wrote:
> I can help you off list. Please mail me directly.
Doing things off-list is generally a bad idea as the Tomcat community as
a whole is unable to benefit from the experience.
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Application Configuration
Posted by Mark Petrovic <ms...@gmail.com>.
I can help you off list. Please mail me directly.
Mark
On 5/14/06, Asaf Lahav <as...@primagrid.com> wrote:
>
> I have several xml files that I need to load from a web service
> application.
> The xml files are not packaged into a WAR file or any other cabinet.
> Where would be the best place to put the xml files and what would be the
> best way to read it?
>
> Asaf Lahav
>
> VP R&D, Prima Grid LTD.
>
> Cellular: 972-54-4717955
>
> Phone: 972-3-6540255
>
> Fax: 972-3-6540254
>
>
>
> -----Original Message-----
> From: Mark Petrovic [mailto:mspetrovic@gmail.com]
> Sent: Monday, May 08, 2006 8:10 PM
> To: Tomcat Users List
> Subject: Re: Application Configuration
>
> You can put those types of resources in your .war file and access them as
> "resources".
>
> servlet.getClass().getResource("xmlfile.xml");
>
> type of scheme.
>
> On 5/8/06, Asaf Lahav <as...@primagrid.com> wrote:
> >
> > Hi everybody,
> >
> >
> >
> > I still need help on this. Please read below.
> >
> >
> >
> > *Asaf Lahav*
> >
> > *VP R&D, Prima Grid LTD.*
> >
> > Cellular: 972-54-4717955
> >
> > Phone: 972-3-6540255
> >
> > Fax: 972-3-6540254
> >
> > ------------------------------
> >
> > *From:* Asaf Lahav [mailto:asaf.lahav@primagrid.com]
> > *Sent:* Monday, May 08, 2006 11:30 AM
> > *To:* users@tomcat.apache.org
> > *Subject:* Application Configuration
> >
> >
> >
> > Hi all,
> >
> >
> >
> > I'm building a web services application that requires configuration xml
> > files.
> >
> > Is there a location where I should put the xml configuration files?
> >
> > Is there a best practice saying where to put configuration files?
> >
> > If there is, how am I expected to get the configuration info from there?
> >
> >
> >
> > Thanks in advance,
> >
> >
> >
> > *Asaf Lahav*
> >
> > *VP R&D, Prima Grid LTD.*
> >
> > Cellular: 972-54-4717955
> >
> > Phone: 972-3-6540255
> >
> > Fax: 972-3-6540254
> >
> >
> >
>
>
>
> --
> Mark
> AE6RT
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
--
Mark
AE6RT
RE: Application Configuration
Posted by Asaf Lahav <as...@primagrid.com>.
I have several xml files that I need to load from a web service application.
The xml files are not packaged into a WAR file or any other cabinet.
Where would be the best place to put the xml files and what would be the
best way to read it?
Asaf Lahav
VP R&D, Prima Grid LTD.
Cellular: 972-54-4717955
Phone: 972-3-6540255
Fax: 972-3-6540254
-----Original Message-----
From: Mark Petrovic [mailto:mspetrovic@gmail.com]
Sent: Monday, May 08, 2006 8:10 PM
To: Tomcat Users List
Subject: Re: Application Configuration
You can put those types of resources in your .war file and access them as
"resources".
servlet.getClass().getResource("xmlfile.xml");
type of scheme.
On 5/8/06, Asaf Lahav <as...@primagrid.com> wrote:
>
> Hi everybody,
>
>
>
> I still need help on this. Please read below.
>
>
>
> *Asaf Lahav*
>
> *VP R&D, Prima Grid LTD.*
>
> Cellular: 972-54-4717955
>
> Phone: 972-3-6540255
>
> Fax: 972-3-6540254
>
> ------------------------------
>
> *From:* Asaf Lahav [mailto:asaf.lahav@primagrid.com]
> *Sent:* Monday, May 08, 2006 11:30 AM
> *To:* users@tomcat.apache.org
> *Subject:* Application Configuration
>
>
>
> Hi all,
>
>
>
> I'm building a web services application that requires configuration xml
> files.
>
> Is there a location where I should put the xml configuration files?
>
> Is there a best practice saying where to put configuration files?
>
> If there is, how am I expected to get the configuration info from there?
>
>
>
> Thanks in advance,
>
>
>
> *Asaf Lahav*
>
> *VP R&D, Prima Grid LTD.*
>
> Cellular: 972-54-4717955
>
> Phone: 972-3-6540255
>
> Fax: 972-3-6540254
>
>
>
--
Mark
AE6RT
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Application Configuration
Posted by Mark Petrovic <ms...@gmail.com>.
You can put those types of resources in your .war file and access them as
"resources".
servlet.getClass().getResource("xmlfile.xml");
type of scheme.
On 5/8/06, Asaf Lahav <as...@primagrid.com> wrote:
>
> Hi everybody,
>
>
>
> I still need help on this. Please read below…
>
>
>
> *Asaf Lahav*
>
> *VP R&D, Prima Grid LTD.*
>
> Cellular: 972-54-4717955
>
> Phone: 972-3-6540255
>
> Fax: 972-3-6540254
>
> ------------------------------
>
> *From:* Asaf Lahav [mailto:asaf.lahav@primagrid.com]
> *Sent:* Monday, May 08, 2006 11:30 AM
> *To:* users@tomcat.apache.org
> *Subject:* Application Configuration
>
>
>
> Hi all,
>
>
>
> I'm building a web services application that requires configuration xml
> files.
>
> Is there a location where I should put the xml configuration files?
>
> Is there a best practice saying where to put configuration files?
>
> If there is, how am I expected to get the configuration info from there?
>
>
>
> Thanks in advance,
>
>
>
> *Asaf Lahav*
>
> *VP R&D, Prima Grid LTD.*
>
> Cellular: 972-54-4717955
>
> Phone: 972-3-6540255
>
> Fax: 972-3-6540254
>
>
>
--
Mark
AE6RT
RE: Application Configuration
Posted by Asaf Lahav <as...@primagrid.com>.
Hi everybody,
I still need help on this. Please read below.
Asaf Lahav
VP R&D, Prima Grid LTD.
Cellular: 972-54-4717955
Phone: 972-3-6540255
Fax: 972-3-6540254
_____
From: Asaf Lahav [mailto:asaf.lahav@primagrid.com]
Sent: Monday, May 08, 2006 11:30 AM
To: users@tomcat.apache.org
Subject: Application Configuration
Hi all,
I'm building a web services application that requires configuration xml
files.
Is there a location where I should put the xml configuration files?
Is there a best practice saying where to put configuration files?
If there is, how am I expected to get the configuration info from there?
Thanks in advance,
Asaf Lahav
VP R&D, Prima Grid LTD.
Cellular: 972-54-4717955
Phone: 972-3-6540255
Fax: 972-3-6540254
RE: Application Configuration
Posted by Tim Lucia <ti...@yahoo.com>.
Suggested practice is to put any property files, XML files, resource(s) of
any kind beneath WEB-INF/classes (or WEB-INF/lib, if a jar). Then you can
load them using one of the mechanisms here:
http://www.javaworld.com/javaworld/javaqa/2003-08/01-qa-0808-property.html
Once you have an InputStream pointing to the desired resource, you may read
it using your favorite mechanism (Digester, DOM parser, your own parse,
java.util.Properties, etc.)
Following these two bits of information will allow your app to work in .war
format, or exploded war (directory) format.
Tim
_____
From: Asaf Lahav [mailto:asaf.lahav@primagrid.com]
Sent: Monday, May 08, 2006 5:30 AM
To: users@tomcat.apache.org
Subject: Application Configuration
Hi all,
I'm building a web services application that requires configuration xml
files.
Is there a location where I should put the xml configuration files?
Is there a best practice saying where to put configuration files?
If there is, how am I expected to get the configuration info from there?
Thanks in advance,
Asaf Lahav
VP R&D, Prima Grid LTD.
Cellular: 972-54-4717955
Phone: 972-3-6540255
Fax: 972-3-6540254