I can't see SAPMLogonLogic.java modification

Hi all,
I need to redirect the portal to another jsp after click on logon button.
So I need to modify SAPMLogonLogic under jar file umelogonbase.jar.
I try this way:
1) Unzip par file from portal
2) Unzip umelogon.jar from PORTAL-INF/lib
3) Create JavaProject on NWDS with all file .java under correct path com.sap.security.core.sapmimp.logon and com.sap.security.core.logonadmin
4) Add all necessary library to correct error
5) Modify file SAPMLogonLogic.java (I add new method)
6) Rebuild project
7) Then I overwrite new .class file to umelogonbase.jar and add this jar file to initial par
8) Upload new par from Support Desk
After upload I can't see the modification.
From umLogonPage on Logon Button I call the new method  where I put only this line of code:
"this.proxy.gotoPage(changePasswordPage);" but the redirect doesn't work and user can access to Portal normally.
Any idea???
Thanks in advance.
Federica.

I had the same situation. You get blank screen if you have (some specific)exceptions thrown in your code. My suggestion is to encapsulate your jsp code in try catch block and manually print out the exceptions on to jsp page using out.println() statement.
hope this helps.
Santhosh
Message was edited by: Santhosh Kumar

Similar Messages

  • Where can i see the java file of a container converted JSP file

    I am using weblogic11g.
    Where can i see the java file of a container converted JSP file .

    Hello.
    If you look for .class files, you will find them under $domain/servers/serverName/tmp/application/etc.
    If you look after .java translated files, nowhere if you don't have "keepgenerated" param set to true in the appc/jspc command line (may be set in a web descriptor but can't find a reference). The foo.java will be find in .\WEB-INF\classes\jspservlet.
    Edit: http://download.oracle.com/docs/cd/E12840_01/wls/docs103/webapp/weblogic_xml.html
    Regards.
    Aurélien.
    Edited by: Aurelien DEHAY on 24 août 2009 17:12

  • I can't see the java errors   (ISA 4 - WAS 6.40)

    Hi everybody,
    Why I can't see the errors originated in jsp?  when an error occurs, the ISA (b2b) displays a blank page only. =(
    Should I make a configuration in WAS or ISA for enabling this ?
    Thanks a lot ! Regards from Mexico.
    Diego

    I had the same situation. You get blank screen if you have (some specific)exceptions thrown in your code. My suggestion is to encapsulate your jsp code in try catch block and manually print out the exceptions on to jsp page using out.println() statement.
    hope this helps.
    Santhosh
    Message was edited by: Santhosh Kumar

  • Can't see the java sign on the address bar

    I need to enable java to see a web page but there is no java sign on the address bar. Something has changed because I used to be able to see the web page before

    Hello,
    In Firefox 23, as part of an effort to simplify the Firefox options set and protect users from unintentially damaging their Firefox, the option to disable JavaScript was removed from the Firefox Options window.
    However, the option to disable JavaScript (Java and Javascript are seperate! see: http://kb.mozillazine.org/JavaScript_is_not_Java) was not removed from Firefox entirely. You can still access it from about:config or by installing an add-on.
    '''about:config'''
    # In the address bar, type "about:config" (with no quotes), and press Enter.
    # Click "I'll be careful, I promise"
    # In the search bar, search for "javascript.enabled" (with no quotes).
    # Right click the result named "javascript.enabled" and click "Toggle". JavaScript is now disabled.
    To Re-enable JavaScript, repeat these steps.
    '''Add-ons'''
    You can alternatively install an add-on that lets you disable JavaScript, such as
    *[https://addons.mozilla.org/firefox/addon/noscript/ No-Script] (to disable JavaScript on a per page basis, as required)
    *[https://addons.mozilla.org/firefox/addon/quickjava/ QuickJava] (to easily disable and enable JavaScript, automatic loading of images, and other content)
    *[https://addons.mozilla.org/firefox/addon/settingsanity/ SettingSanity] (adds back JavaScript options, including Advanced JavaScript Settings, as well as options for loading images and showing the Tab Bar)
    Thank you and I hope this helps!

  • 11g client can't see ws java package

    All,
    I've created a WS project - Web Service Annotations - SecureWS. Data Controls layer was created. It tests out ok.
    Now, I'm creating a client for Web Service Annotations in a different project - SecureClient.
    Access is via JAX-WS
    When I get to step 5 of 9 in the proxy wizard, I can't find the package that exists in the SecureWS project.
    I can see others such as sun.beans
    What is the proper way of handling this? Do I need a JAXB binding setup?
    Thanks

    Things seem to be working in reverse. From the computer in my office i can not observe or control computers in our classroom. I installed ARD on one of the classroom computers and can get to my computer no problem.
    the ACL goes something like this for all the needed ports
    access-list 150 permit tcp any host <my ip address> eq 5900
    access-list 150 permit udp any host <my ip address> eq 5900

  • How can i see hierarchy modifications?(knvh)

    Hi,
    I need to see all the modifications made on a customer hierarchy (if a customer under the hierarchy has been removed date and time of its removal, if a new customer has been added). In case this can be attained only using a query which table should i use?
    Thanks,
    Andrei

    Hi,
    I''ve searched for possible ways of displaying the date but as the OSS SAP Note 548716 states:
    5. Question: Do change documents exist for the customer hierarchy (table KNVH)?
    Answer: No. The customer hierarchy master data is time-dependent master data; that is, change documents are not required. In
    transaction VDH1N/VDH2N, you always receive the customer hierarchy which is valid at the selected validity date.
    I  haven't found an alternative to this.
    Thanks for your support,
    Andrei

  • Jdeveloper 11g Tech Preview 2 can't see my stored java

    Environment win 2000 hitting oracle 9.2.0.6.
    Trying this tool to see if it will allow me to trace some poorly documented java which generates convoluted sql.

    Sorry about the minimal detail. (Can't you read my mind?)
    I'm trying to do several things:
    1. First ascertain whether or not jdeveloper will allow me to "see" the java procs stored in oracle. In the schema browser, it appears that java objects are absent as they ARE NOT when examined via OEM. If the answer to this is "Yes", then I need to know what I ought do to allow me to see them.
    2. Closely on the heels of 1, having accomplished the first, will this tool (or perhaps another) allow me to examine via the debugger, the values of the variables generated by the java. The java I am working with is rather difficult to follow, poorly documented and has the additional layer of obfuscation being that it dynamically generates sql that it submits via the default jdbc connection. This proc was initially designed as a single-threaded (select a record-process-a-record-get-another-record-repeat) process and the contractors after the fact said "Yeah, we can make it a batch", and all it appears to be doing is scooping up all the data in a cursor and single-threading it from the cursor instead of the user prompt.
    If I can see the sql being submitted I may be able to speed this process up both for the online and batch transactions. In addition to this, following the sql generated will allow me to see the defacto business rules we have in place as opposed to the advertised ones.

  • In MAC 10.5.8 I see that latest Java version is 1.5.0_30, can I install latest Java 1.6 version in MAC if yes, how can I install that?

    In MAC 10.5.8 I see that latest Java version is 1.5.0_30, can I install latest Java 1.6 version in MAC if yes, how can I install that?

    This is a User-to-User forum.  We do not have any knowledge into what Apple will or will not do.
    However, based on past history, it is unlikely Apple will invest anything except critical security updates into Mac OS X 10.5.  I could be wrong.
    If you really REALLY need Java 1.6 on your Mac, you should consider upgrading to a newer version of Mac OS X.

  • Can i download java for my ipad, the problem is i open glovis.usgs from my ipad, but i can't see the full page, cause the page need a java...help me please

    Can i download java for my ipad, the problem is i open glovis.usgs from my ipad, but i can't see the full page, cause the page need a java...help me please

    Nope. The iPad (and iPhone and iPod touch) cannot execute Java applets. It's a limitation in iOS from the beginning (just like lack of Flash). You will either need to use a desktop computer or access a desktop computer via RDP or VNC to access that page on iPad.mIn short: there is no native way to use a Java applet on iOS.

  • Can't see portlet provider of pdk-java Framework

    i have installed the pdk-java framework and samples and i have registred a poprtlet provider called " SampleWebProvider".
    when i open the portlet ripository i can't find this provider displayed

    It means while accessing this url
    http://servername.domain.com:7777/servlet/sample
    did u get this testpage... hello
    we have the SAME problem of Hela Abidi!!
    when we access the test page we get this:
    ---------------------------------------->
    Congratulations! You have successfully reached your Provider's Test Page.
    Checking for components:
    Portlets are:
    SampleRenderer
    Lottery
    Snoop
    HelloWorldJsp
    ExpiresSample
    ValidateSample
    HelloWorld
    FormInput
    Multipage
    JSPServicesPortlet
    SubscriberRegistration
    HelloServletWorld
    submitServlet
    Recognizing initialization parameters.
    invalidation_caching : true
    <----------------------------------------------
    it is a bit different from your test page... different PDKv2 version??
    however it seems to be all ok with OC4J... and I can say more: if I click in "Browse Providers" icon inside Portal>Administer tab>Provider I can see my new SampleWebProvider!! but I can't see it in the portlet repository :-(
    this is our system:
    Os: Win 2000 server
    Db 9i 9.0.1.3.1
    Portal version 3.0.9.8.2
    OC4J Release 2 Developer preview (9.0.3.0.0)
    can you help us??
    thanks

  • How can I see videos sent to me on email "enable Java Script how?

    How do I see videos on Mozilla Firefox sent to me on email? How do I enable Java Script?
    == This happened ==
    Every time Firefox opened
    == I have never been able to see videos on webmail on Firefox or any other browser. Why?

    Javascript is active by default, unless you are using NoScript (an add-on)
    If you can't see any video, maybe you don't have the necessary plugins. By watching the list of plugins installed in you computer, I realise you don't have flash, do you?
    http://www.adobe.com/go/EN_US-H-GET-FLASH
    Cheers =)

  • Can i see the column DATA(BLOB type) in PM_OBJECTS of DCM schema

    we installed DCM managed clustering .it is Database repository type.
    i am trying to see the column DATA(BLOB type) in PM_OBJECTS of DCM schema .
    I wrote a program in java to read blob data type and write it into a temporary file.
    when i open temporary files all the data in junk format.
    can i see the real data of thatcolumn.Is it possible?
    first of all for what purpose DCM shema will be used?

    Hi,
    There is no option to show the comments on the diagram.
    We plan to add such feature in the next version.
    Ivan

  • I am running 10.5.8, and just updated my java to java 5 update10. Now my firefox is missing the Java plugin, and I can't load any Java applet at all. When I try it with Safari, it hangs when certain Java applet loads. HELP!!!

    Suddenly my Java plugin is missing and i can't load any Java with Firefox at all, even though i have it enabled in the browser! i've tried loading in java embedding plugin, but it doesn't work. what should i do???

    It's not in Tools> Add-ons >plugins?  Should be Java Plug-in 2 for NPAPI browsers 13.5.0. What are you seeing there? I don't think it's called the embedding plugin any longer.
    Might try getting the Firefox 5 standalone application. Trash the current one and replace it. Doing this won't affect your Profile or any settings.
    http://www.mozilla.com/en-US/firefox/all.html
    If it's enabled, how can it be missing?
    If this doesn't work, ask here. No need to register. Make sure you put (Mac) in the title.
    http://forums.mozillazine.org/viewforum.php?f=38
    Message was edited by: WZZZ
    EDIT. Oops, may be different for 10.5.8. Was thinking recent Java update for 10.6. But try installing a new app anyway. In the past, this got me the latest Java plugin.

  • Network can't see my Mac after upgrading to Mountain Lion 10.8.2

    After upgrading to ML 10.8.2 (coming from Lion), the network (another mac and an iPad) can't see my Macbook-pro.
    Using a network scanner (Fing on iPad), my Macbook is not there, and in the same way all the other services from Macbook-pro (such as Internet sharing, Filemaker sharing, ...) don't work.
    My Macbook-pro is regularly connected to the right network and has a proper IP address (192.168.1.32 with 192.168.1.1 being the router, ...33 the other mac and so on). Also, my Macbook-pro perfectly reaches both other LAN devices and the internet.
    I've tried disabling Firewall but nothing changed. I havn't got any antivirus nor security programs running.
    Anyone experiencing the same issue?

    Please read this whole message before doing anything. This procedure is a diagnostic test. It’s unlikely to solve your problem. Don’t be disappointed when you find that nothing has changed after you complete it. The purpose of this test is to determine whether your problem is caused by third-party system modifications that load automatically at startup or login. Disconnect all wired peripherals except those needed for the test, and remove all aftermarket expansion cards. Boot in safe mode* and log in to the account with the problem. The instructions provided by Apple are as follows: 
    Shut down your computer, wait 30 seconds, and then hold down the shift key while pressing the power button.
    When you see the gray Apple logo, release the shift key.
    If you are prompted to log in, type your password, and then hold down the shift key again as you click  Log in.
     *Note: If FileVault is enabled under OS X 10.7 or later, or if a firmware password is set, or if the boot volume is a software RAID, you can’t boot in safe mode. Safe mode is much slower to boot and run than normal, and some things won’t work at all, including wireless networking on certain Macs. The login screen appears even if you usually log in automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin. Test while in safe mode. Same problem? After testing, reboot as usual (i.e., not in safe mode) and verify that you still have the problem. Post the results of the test.

  • How can i deal with java.security.AccessControlException?

    Hi all, I need to implement JavaMail using Servlet and deploy throught J2EE deployment tool. But when i test out the servlet i will always encounter this exception thrown. How can i solve this?
    java.security.AccessControlException: access denied (java.util.PropertyPermission * read,write)
    This is the servlet i am testing. Please advise. Thanks in advance!
    * @(#)JavaMailServlet.java     1.3 99/12/06
    * Copyright 1998, 1999 Sun Microsystems, Inc. All Rights Reserved.
    * This software is the proprietary information of Sun Microsystems, Inc.
    * Use is subject to license terms.
    import java.io.*;
    import java.util.*;
    import java.text.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import javax.mail.*;
    import javax.mail.internet.*;
    import javax.activation.*;
    * This is a servlet that demonstrates the use of JavaMail APIs
    * in a 3-tier application. It allows the user to login to an
    * IMAP store, list all the messages in the INBOX folder, view
    * selected messages, compose and send a message, and logout.
    * <p>
    * Please note: This is NOT an example of how to write servlets!
    * This is simply to show that JavaMail can be used in a servlet.
    * <p>
    * For more information on this servlet, see the
    * JavaMailServlet.README.txt file.
    * <p>
    * For more information on servlets, see
    * * http://java.sun.com/products/java-server/servlets/index.html
    * @author Max Spivak
    public class JavaMailServlet extends HttpServlet implements SingleThreadModel {
    String protocol = "POP3";
    String mbox = "INBOX";
    * This method handles the "POST" submission from two forms: the
    * login form and the message compose form. The login form has the
    * following parameters: <code>hostname</code>, <code>username</code>,
    * and <code>password</code>. The <code>send</code> parameter denotes
    * that the method is processing the compose form submission.
    public void doPost(HttpServletRequest req, HttpServletResponse res)
         throws ServletException, IOException {
    // get the session
         HttpSession ssn = req.getSession(true);
         String send = req.getParameter("send");
    String host = req.getParameter("hostname");
    String user = req.getParameter("username");
    String passwd = req.getParameter("password");
    URLName url = new URLName(protocol, host, -1, mbox, user, passwd);
    ServletOutputStream out = res.getOutputStream();
         res.setContentType("text/html");
         out.println("<html><body bgcolor=\"#CCCCFF\">");
         if (send != null) {
         // process message sending
         send(req, res, out, ssn);
         } else {
         // initial login
         // create
         MailUserData mud = new MailUserData(url);
         ssn.putValue("javamailservlet", mud);
         try {
              Properties props = System.getProperties();
              System.out.println("url");
              props.put("mail.smtp.host", host);
              Session session = Session.getDefaultInstance(props, null);
              session.setDebug(false);
              Store store = session.getStore(url);
              store.connect();
              Folder folder = store.getDefaultFolder();
              if (folder == null)
              throw new MessagingException("No default folder");
              folder = folder.getFolder(mbox);
              if (folder == null)
              throw new MessagingException("Invalid folder");
              folder.open(Folder.READ_WRITE);
              int totalMessages = folder.getMessageCount();
              Message[] msgs = folder.getMessages();
              FetchProfile fp = new FetchProfile();
              fp.add(FetchProfile.Item.ENVELOPE);
              folder.fetch(msgs, fp);
              // track who logged in
              System.out.println("Login from: " + store.getURLName());
              // save stuff into MUD
              mud.setSession(session);
              mud.setStore(store);
              mud.setFolder(folder);
              // splash
              out.print("<center>");
              out.print("<font face=\"Arial,Helvetica\" font size=+3>");
              out.println("<b>Welcome to JavaMail!</b></font></center><p>");
              // folder table
              out.println("<table width=\"50%\" border=0 align=center>");
              // folder name column header
              out.print("<tr><td width=\"75%\" bgcolor=\"#ffffcc\">");
              out.print("<font face=\"Arial,Helvetica\" font size=-1>");
              out.println("<b>FolderName</b></font></td><br>");
              // msg count column header
              out.print("<td width=\"25%\" bgcolor=\"#ffffcc\">");
              out.print("<font face=\"Arial,Helvetica\" font size=-1>");
              out.println("<b>Messages</b></font></td><br>");
              out.println("</tr>");
              // folder name
              out.print("<tr><td width=\"75%\" bgcolor=\"#ffffff\">");
              out.print("<a href=\"" + HttpUtils.getRequestURL(req) + "\">" +
                   "Inbox" + "</a></td><br>");
              // msg count
              out.println("<td width=\"25%\" bgcolor=\"#ffffff\">" +
                   totalMessages + "</td>");
              out.println("</tr>");
              out.println("</table");
         } catch (Exception ex) {
              out.println(ex.toString());
         } finally {
              out.println("</body></html>");
              out.close();
    * This method handles the GET requests for the client.
    public void doGet (HttpServletRequest req, HttpServletResponse res)
         throws ServletException, IOException {
    HttpSession ses = req.getSession(false); // before we write to out
    ServletOutputStream out = res.getOutputStream();
         MailUserData mud = getMUD(ses);
         if (mud == null) {
         res.setContentType("text/html");
         out.println("<html><body>Please Login (no session)</body></html>");
         out.close();
         return;
         if (!mud.getStore().isConnected()) {
         res.setContentType("text/html");
         out.println("<html><body>Not Connected To Store</body></html>");
         out.close();
         return;
         // mux that takes a GET request, based on parameters figures
         // out what it should do, and routes it to the
         // appropriate method
         // get url parameters
         String msgStr = req.getParameter("message");
    String logout = req.getParameter("logout");
         String compose = req.getParameter("compose");
         String part = req.getParameter("part");
         int msgNum = -1;
         int partNum = -1;
         // process url params
         if (msgStr != null) {
         // operate on message "msgStr"
         msgNum = Integer.parseInt(msgStr);
         if (part == null) {
              // display message "msgStr"
    res.setContentType("text/html");
              displayMessage(mud, req, out, msgNum);
         } else if (part != null) {
              // display part "part" in message "msgStr"
              partNum = Integer.parseInt(part);
    displayPart(mud, msgNum, partNum, out, res);
         } else if (compose != null) {
         // display compose form
         compose(mud, res, out);
    } else if (logout != null) {
         // process logout
    try {
    mud.getFolder().close(false);
    mud.getStore().close();
              ses.invalidate();
    out.println("<html><body>Logged out OK</body></html>");
    } catch (MessagingException mex) {
    out.println(mex.toString());
         } else {
         // display headers
         displayHeaders(mud, req, out);
    /* main method to display messages */
    private void displayMessage(MailUserData mud, HttpServletRequest req,
                        ServletOutputStream out, int msgNum)
         throws IOException {
         out.println("<html>");
    out.println("<HEAD><TITLE>JavaMail Servlet</TITLE></HEAD>");
         out.println("<BODY bgcolor=\"#ccccff\">");
         out.print("<center><font face=\"Arial,Helvetica\" ");
         out.println("font size=\"+3\"><b>");
         out.println("Message " + (msgNum+1) + " in folder " +
              mud.getStore().getURLName() +
              "/INBOX</b></font></center><p>");
         try {
         Message msg = mud.getFolder().getMessage(msgNum);
         // first, display this message's headers
         displayMessageHeaders(mud, msg, out);
         // and now, handle the content
         Object o = msg.getContent();
         //if (o instanceof String) {
         if (msg.isMimeType("text/plain")) {
              out.println("<pre>");
              out.println((String)o);
              out.println("</pre>");
         //} else if (o instanceof Multipart){
         } else if (msg.isMimeType("multipart/*")) {
              Multipart mp = (Multipart)o;
              int cnt = mp.getCount();
              for (int i = 0; i < cnt; i++) {
              displayPart(mud, msgNum, mp.getBodyPart(i), i, req, out);
         } else {
              out.println(msg.getContentType());
         } catch (MessagingException mex) {
         out.println(mex.toString());
         out.println("</BODY></html>");
         out.close();
    * This method displays a message part. <code>text/plain</code>
    * content parts are displayed inline. For all other parts,
    * a URL is generated and displayed; clicking on the URL
    * brings up the part in a separate page.
    private void displayPart(MailUserData mud, int msgNum, Part part,
                   int partNum, HttpServletRequest req,
                   ServletOutputStream out)
         throws IOException {
         if (partNum != 0)
         out.println("<p><hr>");
    try {
         String sct = part.getContentType();
         if (sct == null) {
              out.println("invalid part");
              return;
         ContentType ct = new ContentType(sct);
         if (partNum != 0)
              out.println("<b>Attachment Type:</b> " +
                   ct.getBaseType() + "<br>");
         if (ct.match("text/plain")) {
              // display text/plain inline
              out.println("<pre>");
              out.println((String)part.getContent());
              out.println("</pre>");
         } else {
              // generate a url for this part
              String s;
              if ((s = part.getFileName()) != null)
              out.println("<b>Filename:</b> " + s + "<br>");
              s = null;
              if ((s = part.getDescription()) != null)
              out.println("<b>Description:</b> " + s + "<br>");
              out.println("<a href=\"" +
                   HttpUtils.getRequestURL(req) +
                   "?message=" +
                   msgNum + "&part=" +
                   partNum + "\">Display Attachment</a>");
         } catch (MessagingException mex) {
         out.println(mex.toString());
    * This method gets the stream from for a given msg part and
    * pushes it out to the browser with the correct content type.
    * Used to display attachments and relies on the browser's
    * content handling capabilities.
    private void displayPart(MailUserData mud, int msgNum,
                   int partNum, ServletOutputStream out,
                   HttpServletResponse res)
         throws IOException {
         Part part = null;
    try {
         Message msg = mud.getFolder().getMessage(msgNum);
         Multipart mp = (Multipart)msg.getContent();
         part = mp.getBodyPart(partNum);
         String sct = part.getContentType();
         if (sct == null) {
              out.println("invalid part");
              return;
         ContentType ct = new ContentType(sct);
         res.setContentType(ct.getBaseType());
         InputStream is = part.getInputStream();
         int i;
         while ((i = is.read()) != -1)
              out.write(i);
         out.flush();
         out.close();
         } catch (MessagingException mex) {
         out.println(mex.toString());
    * This is a utility message that pretty-prints the message
    * headers for message that is being displayed.
    private void displayMessageHeaders(MailUserData mud, Message msg,
                        ServletOutputStream out)
         throws IOException {
         try {
         out.println("<b>Date:</b> " + msg.getSentDate() + "<br>");
    Address[] fr = msg.getFrom();
    if (fr != null) {
    boolean tf = true;
    out.print("<b>From:</b> ");
    for (int i = 0; i < fr.length; i++) {
    out.print(((tf) ? " " : ", ") + getDisplayAddress(fr));
    tf = false;
    out.println("<br>");
    Address[] to = msg.getRecipients(Message.RecipientType.TO);
    if (to != null) {
    boolean tf = true;
    out.print("<b>To:</b> ");
    for (int i = 0; i < to.length; i++) {
    out.print(((tf) ? " " : ", ") + getDisplayAddress(to[i]));
    tf = false;
    out.println("<br>");
    Address[] cc = msg.getRecipients(Message.RecipientType.CC);
    if (cc != null) {
    boolean cf = true;
    out.print("<b>CC:</b> ");
    for (int i = 0; i < cc.length; i++) {
    out.print(((cf) ? " " : ", ") + getDisplayAddress(cc[i]));
              cf = false;
    out.println("<br>");
         out.print("<b>Subject:</b> " +
              ((msg.getSubject() !=null) ? msg.getSubject() : "") +
              "<br>");
    } catch (MessagingException mex) {
         out.println(msg.toString());
    * This method displays the URL's for the available commands and the
    * INBOX headerlist
    private void displayHeaders(MailUserData mud,
                        HttpServletRequest req,
    ServletOutputStream out)
         throws IOException {
    SimpleDateFormat df = new SimpleDateFormat("EE M/d/yy");
    out.println("<html>");
    out.println("<HEAD><TITLE>JavaMail Servlet</TITLE></HEAD>");
         out.println("<BODY bgcolor=\"#ccccff\"><hr>");
         out.print("<center><font face=\"Arial,Helvetica\" font size=\"+3\">");
         out.println("<b>Folder " + mud.getStore().getURLName() +
              "/INBOX</b></font></center><p>");
         // URL's for the commands that are available
         out.println("<font face=\"Arial,Helvetica\" font size=\"+3\"><b>");
    out.println("<a href=\"" +
              HttpUtils.getRequestURL(req) +
              "?logout=true\">Logout</a>");
    out.println("<a href=\"" +
              HttpUtils.getRequestURL(req) +
              "?compose=true\" target=\"compose\">Compose</a>");
         out.println("</b></font>");
         out.println("<hr>");
         // List headers in a table
    out.print("<table cellpadding=1 cellspacing=1 "); // table
         out.println("width=\"100%\" border=1>"); // settings
         // sender column header
         out.println("<tr><td width=\"25%\" bgcolor=\"ffffcc\">");
         out.println("<font face=\"Arial,Helvetica\" font size=\"+1\">");
         out.println("<b>Sender</b></font></td>");
         // date column header
         out.println("<td width=\"15%\" bgcolor=\"ffffcc\">");
         out.println("<font face=\"Arial,Helvetica\" font size=\"+1\">");
         out.println("<b>Date</b></font></td>");
         // subject column header
         out.println("<td bgcolor=\"ffffcc\">");
         out.println("<font face=\"Arial,Helvetica\" font size=\"+1\">");
         out.println("<b>Subject</b></font></td></tr>");
         try {
         Folder f = mud.getFolder();
         int msgCount = f.getMessageCount();
         Message m = null;
         // for each message, show its headers
         for (int i = 1; i <= msgCount; i++) {
    m = f.getMessage(i);
              // if message has the DELETED flag set, don't display it
              if (m.isSet(Flags.Flag.DELETED))
              continue;
              // from
    out.println("<tr valigh=middle>");
    out.print("<td width=\"25%\" bgcolor=\"ffffff\">");
              out.println("<font face=\"Arial,Helvetica\">" +
                   ((m.getFrom() != null) ?
                   m.getFrom()[0].toString() :
                   "" ) +
                   "</font></td>");
              // date
    out.print("<td nowrap width=\"15%\" bgcolor=\"ffffff\">");
              out.println("<font face=\"Arial,Helvetica\">" +
    df.format((m.getSentDate()!=null) ?
                        m.getSentDate() : m.getReceivedDate()) +
                   "</font></td>");
              // subject & link
    out.print("<td bgcolor=\"ffffff\">");
              out.println("<font face=\"Arial,Helvetica\">" +
              "<a href=\"" +
                   HttpUtils.getRequestURL(req) +
    "?message=" +
    i + "\">" +
    ((m.getSubject() != null) ?
                   m.getSubject() :
                   "<i>No Subject</i>") +
    "</a>" +
    "</font></td>");
    out.println("</tr>");
         } catch (MessagingException mex) {
         out.println("<tr><td>" + mex.toString() + "</td></tr>");
         mex.printStackTrace();
         out.println("</table>");
         out.println("</BODY></html>");
         out.flush();
         out.close();
    * This method handles the request when the user hits the
    * <i>Compose</i> link. It send the compose form to the browser.
    private void compose(MailUserData mud, HttpServletResponse res,
                   ServletOutputStream out)
         throws IOException {
         res.setContentType("text/html");
         out.println(composeForm);
         out.close();
    * This method processes the send request from the compose form
    private void send(HttpServletRequest req, HttpServletResponse res,
              ServletOutputStream out, HttpSession ssn)
         throws IOException {
    String to = req.getParameter("to");
         String cc = req.getParameter("cc");
         String subj = req.getParameter("subject");
         String text = req.getParameter("text");
         try {
         MailUserData mud = getMUD(ssn);
         if (mud == null)
              throw new Exception("trying to send, but not logged in");
         Message msg = new MimeMessage(mud.getSession());
         InternetAddress[] toAddrs = null, ccAddrs = null;
         if (to != null) {
              toAddrs = InternetAddress.parse(to, false);
              msg.setRecipients(Message.RecipientType.TO, toAddrs);
         } else
              throw new MessagingException("No \"To\" address specified");
         if (cc != null) {
              ccAddrs = InternetAddress.parse(cc, false);
              msg.setRecipients(Message.RecipientType.CC, ccAddrs);
         if (subj != null)
              msg.setSubject(subj);
         URLName u = mud.getURLName();
         msg.setFrom(new InternetAddress(u.getUsername() + "@" +
                             u.getHost()));
         if (text != null)
              msg.setText(text);
         Transport.send(msg);
         out.println("<h1>Message sent successfully</h1></body></html>");
         out.close();
         } catch (Exception mex) {
         out.println("<h1>Error sending message.</h1>");
         out.println(mex.toString());
         out.println("<br></body></html>");
    // utility method; returns a string suitable for msg header display
    private String getDisplayAddress(Address a) {
    String pers = null;
    String addr = null;
    if (a instanceof InternetAddress &&
    ((pers = ((InternetAddress)a).getPersonal()) != null)) {
         addr = pers + " "+"<"+((InternetAddress)a).getAddress()+">";
    } else
    addr = a.toString();
    return addr;
    // utility method; retrieve the MailUserData
    // from the HttpSession and return it
    private MailUserData getMUD(HttpSession ses) throws IOException {
         MailUserData mud = null;
         if (ses == null) {
         return null;
         } else {
         if ((mud = (MailUserData)ses.getValue("javamailservlet")) == null){
              return null;
         return mud;
    public String getServletInfo() {
    return "A mail reader servlet";
    * This is the HTML code for the compose form. Another option would
    * have been to use a separate html page.
    private static String composeForm = "<HTML><HEAD><TITLE>JavaMail Compose</TITLE></HEAD><BODY BGCOLOR=\"#CCCCFF\"><FORM ACTION=\"/servlet/JavaMailServlet\" METHOD=\"POST\"><input type=\"hidden\" name=\"send\" value=\"send\"><P ALIGN=\"CENTER\"><B><FONT SIZE=\"4\" FACE=\"Verdana, Arial, Helvetica\">JavaMail Compose Message</FONT></B><P><TABLE BORDER=\"0\" WIDTH=\"100%\"><TR><TD WIDTH=\"16%\" HEIGHT=\"22\">     <P ALIGN=\"RIGHT\"><B><FONT FACE=\"Verdana, Arial, Helvetica\">To:</FONT></B></TD><TD WIDTH=\"84%\" HEIGHT=\"22\"><INPUT TYPE=\"TEXT\" NAME=\"to\" SIZE=\"30\"> <FONT SIZE=\"1\" FACE=\"Verdana, Arial, Helvetica\"> (separate addresses with commas)</FONT></TD></TR><TR><TD WIDTH=\"16%\"><P ALIGN=\"RIGHT\"><B><FONT FACE=\"Verdana, Arial, Helvetica\">CC:</FONT></B></TD><TD WIDTH=\"84%\"><INPUT TYPE=\"TEXT\" NAME=\"cc\" SIZE=\"30\"> <FONT SIZE=\"1\" FACE=\"Verdana, Arial, Helvetica\"> (separate addresses with commas)</FONT></TD></TR><TR><TD WIDTH=\"16%\"><P ALIGN=\"RIGHT\"><B><FONT FACE=\"Verdana, Arial, Helvetica\">Subject:</FONT></B></TD><TD WIDTH=\"84%\"><INPUT TYPE=\"TEXT\" NAME=\"subject\" SIZE=\"55\"></TD></TR><TR><TD WIDTH=\"16%\"> </TD><TD WIDTH=\"84%\"><TEXTAREA NAME=\"text\" ROWS=\"15\" COLS=\"53\"></TEXTAREA></TD></TR><TR><TD WIDTH=\"16%\" HEIGHT=\"32\"> </TD><TD WIDTH=\"84%\" HEIGHT=\"32\"><INPUT TYPE=\"SUBMIT\" NAME=\"Send\" VALUE=\"Send\"><INPUT TYPE=\"RESET\" NAME=\"Reset\" VALUE=\"Reset\"></TD></TR></TABLE></FORM></BODY></HTML>";
    * This class is used to store session data for each user's session. It
    * is stored in the HttpSession.
    class MailUserData {
    URLName url;
    Session session;
    Store store;
    Folder folder;
    public MailUserData(URLName urlname) {
         url = urlname;
    public URLName getURLName() {
         return url;
    public Session getSession() {
         return session;
    public void setSession(Session s) {
         session = s;
    public Store getStore() {
         return store;
    public void setStore(Store s) {
         store = s;
    public Folder getFolder() {
         return folder;
    public void setFolder(Folder f) {
         folder = f;

    You posted a thousand lines of badly-formatted code and didn't have the sense to say which one had the exception.
    My guess is that it was this one:Session session = Session.getDefaultInstance(props, null);because that happened to me. I fixed it by calling getInstance instead of getDefaultInstance.
    However if that isn't the problem, how about spending a few seconds to post a less useless question?

Maybe you are looking for

  • Script Error Message on OS 10.4.8

    I have 2 applications (games) which my son likes to use. They are "Welcome to Merriweather Farm" and "Busy Days In Deerfield Valley". Great games for kids who like John Deere Tractors and related stuff. The games installed fine and ran fine for a few

  • Is there any antivirus program downloadable for no...

    Hi,                       When i see my brothers phone, nokia 7210 supernova, when downloading some songs, the english letters including folders in the memoy card changes as other foreign languages or machine language, which i do not know. The unwant

  • Filevault secure delete problem

    Hi, I installed Snow Leopard and updated my system and everything was running smoothly. It freed up over 17gigs on my hd! Then I turned on Filevault with the option to secure delete the old home folder. While it was deleting the old home folder, ( af

  • Schema Error with Oracle Apps Adapter

    Hi folks, I'm trying to create a simple BPEL process to call the CREATE_LOCATION API in eBus 11.5.10.2 on a 10g Oracle Database. I'm using jdeveloper 10.1.3.4. I create the partner link with success, creating the wrapper package due to the record typ

  • Rows with different background color in array

    I am displaying an array indicator. When certain values are found in a row of the array, I would like the row to have a different background color so that it stands out on the front panel. Can this be done? Especially, can this be done using property