HTTP状态500 - 内部服务器错误 - Apache Tomcat(Restful webservice)

时间:2015-10-13 10:44:03

标签: java rest tomcat

当我尝试运行以下代码时,我收到错误... 控制台没有enter image description here显示任何错误。

public List<MailExample> getMailAttributes()
{
    List<MailExample> 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<MailExample>();
            mailList.add(me);
        }
        else
        {
            FileInputStream fis = new FileInputStream(file);
            ObjectInputStream oos = new ObjectInputStream(fis);
            mailList = (List<MailExample>) oos.readObject();
            oos.close();
        }

    }
    catch(Exception e)
    {
        e.printStackTrace();
    }
    return mailList;

0 个答案:

没有答案