----------------------------------------------------------------
BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
WHEN YOU POST, include all relevant version numbers, log files,
and configuration files.  Don't make us guess your problem!!!
----------------------------------------------------------------

Hi,

I'm not sure if this will be an answer to your question. Anyway, if you want 
to use an external file containing parameters for your servlet (or any other 
java program) you can use a property file. Suppose you have the following 
property file called "foo.property". The contents of this file is:

a.property=I_Am_A_Parameter


If you use the following code to read this file:

Properties servletProps = new Properties();
FileInputStream in = new FileInputStream("foo.property");
servletProps.load(in);
in.close();
String aProperty = servletProps.getProperty(a.property)

then string aProperty will contain "I_Am_A_Parameter".


I hope this helps,

Kenneth Westelinck

>From: "CND" <[EMAIL PROTECTED]>
>Reply-To: "Java Apache Users" <[EMAIL PROTECTED]>
>To: "Java Apache Users" <[EMAIL PROTECTED]>
>Subject: Re: how does jserv read the zone.properties file
>Date: Sat, 20 Jan 2001 19:35:44 +1100
>
>----------------------------------------------------------------
>BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
>WHEN YOU POST, include all relevant version numbers, log files,
>and configuration files.  Don't make us guess your problem!!!
>----------------------------------------------------------------
>
>Chris
>
>What part of the propeties file are you trying to read?
>
>Chris
>
>On Fri, 19 Jan 2001 15:04:34 -0600, Chris Busch wrote:
>
> >----------------------------------------------------------------
> >BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
> >WHEN YOU POST, include all relevant version numbers, log files,
> >and configuration files.  Don't make us guess your problem!!!
> >----------------------------------------------------------------
> >
> >How does jserv read the zone.properties file.  Is there a getProperties()
> >method that returns what is in the properties file?
> >
> >
> >--
> >--------------------------------------------------------------
> >Please read the FAQ! <http://java.apache.org/faq/>
> >To subscribe:        [EMAIL PROTECTED]
> >To unsubscribe:      [EMAIL PROTECTED]
> >Search Archives:
> ><http://www.mail-archive.com/java-apache-users%40list.working-dogs.com/>
> >Problems?:           [EMAIL PROTECTED]
> >
>
>
>
>
>--
>--------------------------------------------------------------
>Please read the FAQ! <http://java.apache.org/faq/>
>To subscribe:        [EMAIL PROTECTED]
>To unsubscribe:      [EMAIL PROTECTED]
>Search Archives:
><http://www.mail-archive.com/java-apache-users%40list.working-dogs.com/>
>Problems?:           [EMAIL PROTECTED]
>

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.



--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search Archives: 
<http://www.mail-archive.com/java-apache-users%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to