Hi
Problem 1:
You can also use a Singleton Class (only has one instance with static
getter).
You may declare an Object of this class as attribute of your servlets and
initiate (with the static getter) in your servlet-init method (in every
servlet you want to have your data).
Then save your objects in this class (with Hashtable or similar). Now every
servlet can fetch this objects. The Singleton object survives as long as at
least one servlet is alive.
greets -peter
p.s.: please use subjects which describe your problem (not: TWO PROBLEMS !!)
-----Urspr�ngliche Nachricht-----
Von: Andras Balogh <[EMAIL PROTECTED]>
An: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Datum: Freitag, 12. November 1999 15:41
Betreff: Re: TWO PROBLEMS !!
>Hi,
>
>----- Original Message -----
>From: Lalith Jayaweera <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Sent: Thursday, November 11, 1999 8:42 PM
>Subject: TWO PROBLEMS !!
>
>
>> Hi
>> I need Ur help to sort it out following twoe two questions .
>>
>> (1) How can we pass a variable which is used in one servlet to another
>> servlet which will be used later.What am currently doing is creating a
>> session object and putting the value and getting the value back when
>> necessary.Is there any otherway that I can use instead of this one.
>
>
>You can use hidden fields but i think session is a better solution.
>
>A hidden field looks like this:
>
><input type="hidden" name="age" value="22">
>
>....
>....
>....
>> Thanks in Advance
>> lalith
>>
>
>Hope it helps,
>
> Best wishes,
> Andras.
>
>___________________________________________________________________________
>To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
>of the message "signoff SERVLET-INTEREST".
>
>Archives: http://archives.java.sun.com/archives/servlet-interest.html
>Resources: http://java.sun.com/products/servlet/external-resources.html
>LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html