1 32 33 package scioworks.imap.presentation.imapWeb; 34 35 import javax.mail.*; 36 import javax.activation.*; 37 38 import com.lutris.appserver.server.httpPresentation.*; 39 40 import scioworks.imap.presentation.base.*; 41 import scioworks.imap.presentation.imapWeb.*; 42 43 public class main extends BasePO { 44 45 protected boolean isLoginRequired() { 47 return false; 48 } 49 50 public String handleDefault() 51 throws HttpPresentationException { 52 53 mainHTML page = (mainHTML)m_comms.xmlcFactory.create(mainHTML.class); 54 try{ 55 56 Folder folder = super.getImapWebSessionData().getImapStore().getFolder("INBOX"); 57 58 int count = folder.getUnreadMessageCount(); 59 60 61 62 63 page.setTextNewMessageCount(Integer.toString(count)); 64 65 66 67 72 } catch(NullPointerException ex) { 73 74 } catch (MessagingException e) { 75 return super.showErrorPage("Error getting message count", e.getMessage(), 76 "", ""); 77 } 78 return page.toDocument(); 79 80 } 81 } | Popular Tags |