title: Real time notification in jsp pages with tomcat server
body: <p>I am newbei in JSP subject and I am using Apache application server in Eclipse with no framework.In the project, there are more than one users.I want to enable one user to send information to another user as notification.User2 should see this notification.</p>
  
  <p>draft.jsp</p>
  
  <pre><code>&lt;div style=" float: right; margin-right:600px;margin-top:20px;"&gt;
  ID:&amp;nbsp;&amp;nbsp;&lt;%=Id%&gt;
  
  Type:
   &lt;select name="routine"&gt;
  &lt;option value="select"&gt;select&lt;/option&gt;
  &lt;option value="option1"&gt;option1&lt;/option&gt;
  &lt;option value="option2"&gt;option2&lt;/option&gt;
  &lt;option value="option3"&gt;option3&lt;/option&gt;
  &lt;option value="option4"&gt;option4&lt;/option&gt;
  &lt;/select&gt;
  Name:&lt;input type="text" name="Name"/&gt;
  Period:&lt;textarea rows=5 cols=10 name=period&gt;&lt;/textarea&gt;
  &lt;button&gt;Finish&lt;/button&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Here is the part of the jsp page.When User1 click button Finish, the information will be sent to the User2.</p>
  
  <p>I searced on the internet, but cannot find any useful example or tutorial related my issue.
  I saw that Atmosphere, comet, Jetty and Websocket can be solution but I was not able to use these and I am not totally sure, whether they are suitable for my issue or not.Should I use the long polling or short polling?</p>
  
  <p>I also saw the similar <a href="https://stackoverflow.com/questions/16119574/how-to-show-notifications-in-a-jsp-page-in-real-time">question</a> but I couldn't understand the accepted answer.Can you please give me any idea to solve this problem?And any idea will be appreciated.Thanks in advance.</p>