Hi Christopher,
On Tue, 20 Jul 1999, Christopher T. Beers wrote:
CTB| I appreciate everyone help in this matter yesterday. The porblem
CTB| was the scope of my doPost() method. Outside of the method I declare
CTB|
CTB| private Hashtable table = new Hashtable();
You should never do this, because the doPost(), doGet() or
service()-Method could be called from several threads _in parallel_ which
means that your parameters could get munged if two peope connect to your
servlet. You've to make sure that your methods are reentrant.
In order to get this save, initialize your Hashtable in the processing
method:
public void doPost (...) {
Hashtable table = new Hashtable();
.. do stuff
}
If you need these parameters in other methods in your servlet (which is
what I assume you want do), you've to pass the table as parameter .. no
way around it ..
ciao,
-hen
---
Henner Zeller [EMAIL PROTECTED]
PGP pub key [77F75B39]: finger [EMAIL PROTECTED]
If Microsoft is the answer, it must have been a VERY silly question.
--
--------------------------------------------------------------
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]