title: HTTP Status 500 - Internal Server Error - Apache Tomcat(Restful webservice)
body: <p>When I tried to run the below code I am getting the error...
  console did not<a href="https://i.stack.imgur.com/6OhEm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6OhEm.png" alt="enter image description here"></a> show any errors.</p>
  
  <pre><code>public List&lt;MailExample&gt; getMailAttributes()
  {
      List&lt;MailExample&gt; mailList = null;
  
      try
      {
          File file = new File("c:/mail.dat");
          if(!file.exists())
          {
              MailExample me = new MailExample("manoj.@webservices.com", "Test Mail", "hi this is the testing mail");
              mailList = new ArrayList&lt;MailExample&gt;();
              mailList.add(me);
          }
          else
          {
              FileInputStream fis = new FileInputStream(file);
              ObjectInputStream oos = new ObjectInputStream(fis);
              mailList = (List&lt;MailExample&gt;) oos.readObject();
              oos.close();
          }
  
      }
      catch(Exception e)
      {
          e.printStackTrace();
      }
      return mailList;
  </code></pre>