title: Using class in JSP
body: <p>I have a class</p>
  
  <pre><code>public class MyServlet extends HttpServlet {
  
  ...
  
         private static MyObject myobject;
  
         public static MyObject getMyObject(){
             return myobject;
         }
  }
  </code></pre>
  
  <p>and a jsp in which I have</p>
  
  <pre><code>&lt;%! MyObject my_jsp_object = MyServlet.getMyObject();%&gt;
  </code></pre>
  
  <p>myobject has an initial status, which I can modify and save.</p>
  
  <p>The problems occur when I modify myobject ON THE SERVER. I would expect that, if I modify myobject and then reload the jsp, my_jsp_object is modified too, but it isn't. </p>
  
  <p>Where am I wrong? How can I obtain this behaviour? Thanks</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>For the sake of clarity, this is the behaviour I would like to obtain</p>
  
  <ol>
  <li>Start the server</li>
  <li>Get the jsp with the initial value of myobject stored in my_jsp_object</li>
  <li>Someone somewhere someway modify myobject</li>
  <li>When i reload the jsp, I have the new value of myobject stored in my_jsp_object</li>
  </ol>
  
  <p>Until now, when i reload the jsp, I still have the old value of myobject stored in my_jsp_object</p>