Search:

Type: Posts; User: copeg

Search: Search took 0.12 seconds.

  1. Re: What can I use instead of instance variables in a servlet?

    Pojo = plain old java object.


    public class MyClass{
    private int value;

    public MyClass(int val){
    value = val;
    }
    public void setValue(int val){
  2. Re: What can I use instead of instance variables in a servlet?

    One option would be to re-write the function: create a pojo (plain old java object) class that wraps the data, then pass an instance of this class to the function as a parameter and let the method do...
  3. Re: What can I use instead of instance variables in a servlet?

    I guess the more important question is what you want to do? If you are worried about threading, then synchronize access to the instance variable. If you want the data to survive server shutdowns,...
  4. Re: What can I use instead of instance variables in a servlet?

    Did you try the code you posted? The servlet life cycle might give you what you want...
Results 1 to 4 of 4