Why not use multiple parameters, and have your init() method iterate
through them until it can't find any more?

servlet.initArgs=url1=http://etc
servlet.initArgs=url2=http://etc
servlet.initArgs=url3=http://etc

When init() gets a null return for url4, it knows it's out of parameters.

Just my suggestion.

J



>That's kinda my point (that this doesn't have to be complicated).  I'm
>talking about setting up a properties file and you tell me I somehow have to
>run an Encode within it.   I guess I'm just not getting my point across and
>it's not worth making a fuss over.   I think I'll just experiment with
>delimiters until I find a safe one.  I thought this would be a trivial
>matter, but I guess not.
>
>
>John Brecht
>Department of Physics and Astronomy
>Michigan State University
>[EMAIL PROTECTED]
>
>
>----- Original Message -----
>From: jon * <[EMAIL PROTECTED]>
>To: Java Apache Users <[EMAIL PROTECTED]>
>Sent: Monday, May 17, 1999 4:41 PM
>Subject: Re: delimiters in parameters
>
>
>> > So, I would write an app that does the Encode, run it on the URLs I want
>to
>> > include, Serialize the result and save it to a file, and put a pointer
>to
>> > that file in the parameters section of the zone.properties file?  Please
>> > explain.
>>
>> Sure, that sounds like a good idea. or even easier, write a program that
>> does a System.out.println of the encoded string urls and that data is then
>> copy/pasted into your .initArgs file or placed into the properties file
>for
>> that zone.
>>
>> String url1 = "http://www.clearink.com/";
>> String url2 = "http://www.working-dogs.com/";
>> System.out.print( java.net.URLEncoder.encode("url=" + url1) + "&" +
>> java.net.URLEncoder.encode("url=" + url2) );
>>
>> With the above example in mind, now all you have to do is run
>> org.apache.jserv.JServUtils.URLDecode() to get a Hashtable. That Hashtable
>> will have a key of "url" which is a String[].
>>
>> Or, you can get more complicated and write the URL's in an XML with a DTD
>> and use www.openxml.org's parser to create XML model that you can loop
>over.
>> But, that seems like a lot of extra work to me.
>>
>> -jon
>>
>>
>> -- --------------------------------------------------------------
>> To subscribe:        [EMAIL PROTECTED]
>> To unsubscribe:      [EMAIL PROTECTED]
>> READ THE FAQ!!!!     <http://java.apache.org/faq/>
>> Archives and Other:  <http://java.apache.org/main/mail.html/>
>> Problems?:           [EMAIL PROTECTED]
>>
>>
>
>
>
>-- --------------------------------------------------------------
>To subscribe:        [EMAIL PROTECTED]
>To unsubscribe:      [EMAIL PROTECTED]
>READ THE FAQ!!!!     <http://java.apache.org/faq/>
>Archives and Other:  <http://java.apache.org/main/mail.html/>
>Problems?:           [EMAIL PROTECTED]





-- --------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
READ THE FAQ!!!!     <http://java.apache.org/faq/>
Archives and Other:  <http://java.apache.org/main/mail.html/>
Problems?:           [EMAIL PROTECTED]

Reply via email to