Urgent Help Please..How to show an alert in jsp if servlet has an exception

Hi
I am calling a servlet from popup jsp.
When the values are submitted from the jsp I am calling the servlet where i have functionality to send an email. But if email fails in the servlet I have to return to the popupjsp and show an alert to the user.
If any body knows please help.
thanks in advance.

Hi,
Do like this :
In the servlet's doPost() method, add codes in the manner
mentioned below.
public void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException{
PrintWriter out = response.getWriter();
try{
//throw new Exception();
catch(Exception ex){
out.println("<html><body>");
out.println("<script language='javaScript'>");
out.println("alert('Exception Occured Servlet...');</script>");
out.println("</body></html>");
Hope it helps.
Regards,
Sudhir

Similar Messages

  • Can anyone help please. how do i get the home button to appear on the touch screen my home button has stopped working?

    can anyone help please. how do i get the home button to appear on the touch screen my home button has stopped working?

    I have same problem.
    However, I am unable to turn on Assistive Touch.
    At one time I was able to activate it, but it went away and now I cant reactivate.
    What is the solution?

  • Urgent help please, I made an file with the size 1024x768, then i made two folios, one for retina 2048x1536 and one for non retina 1024x768, i have alot of video content in it, everything works perfect on my retina ipad, but when i open it on ipad 2 an er

    Urgent help please, I made an file with the size 1024x768, then i made two folios, one for retina 2048x1536 and one for non retina 1024x768, i have alot of video content in it, everything works perfect on my retina ipad, but when i open it on ipad 2 an error appears on the pages with video content?

    its in german:
    der Vorgang könnte nicht abgeschlossen werden.
    something like the process coundnt be completed

  • HELP WITH IPHONE 4S IPHONE URGENT HELP PLEASE?

    IPHONE URGENT HELP PLEASE?
    for the whole day my network has been 'Searching...'
    i have tried airplane mode on and off, turning my phone on and off and network reset and taking sim in and out.
    so i backed up my phone and restored to factory settings as i don't think i did the option of choosing manually select a carrier.
    my network is still 'searching...' and it won't let my wifi to allow me to activate my iphone. i have tried to connect to itunes and it still won;t work.
    i keep getting a message about no activation server.
    this is a new iphone. i got it replaced on saturday.
    PLEASE SOMEONE HELP ME!!!!!!!!!!!!!!!!!!!!!!!!!!!

    Hello,
    If this is a new iPhone then you will have free access, as all iPhones come with it, to Apple support. I would have them take care of an issue like this.
    Hope this helps.
    Regards,
    Jake

  • b font color ='red' Java JDBC and Oracle DB URGENT HELP PLEASE /font /b

    Hello, I am a newbie. I'm very interested in Java in relation to JDBC, Oracle and SAP.I am trying to connect to an Oracle DB and I have problems to display the output on the consule in my application. What am I doing wrong here . Please help me. This is my code: Please Explain
    import java.sql.*;
    import java.sql.DriverManager;
    import java.sql.Connection;
    public class SqlConnection {
         public static void main(String[] args) {
              Class.forName("oracle.jdbc.driver.OracleDriver"); //Loading the Oracle Driver.
              Connection con = DriverManager.getConnection
              ("jdbc:orcle:thin:@34.218.5.3:1521:ruka","data","data"); //making the connection.
              Statement stmt = con.createStatement ();// Sending a query to the database
              ResultSet rs = stmt.executeQuery("SELECT man,jean,test,kok FROM sa_kostl");
              while (rs.next()) {
                   String man = rs.getString("1");
                   String jean = rs.getString("2");
                   String test = rs.getString("3");
                   String kok = rs.getString("4");
                   System.out.println( man, jean, test,kok );//here where my the
                                                 //compiler gives me errors
              stmt.close();
              con.close();
    }

    <b><font color ='red'>Java JDBC and Oracle DB URGENT HELP PLEASE</font></b>Too bad your attempt at getting your subject to have greater attention failed :p

  • Just bought Elements 13. Input serial number (starting 1057), which is not recognised and the installation stalls here. Urgent help please...

    Just bought Elements 13. Input serial number (starting 1057), which is not recognised and the installation stalls here. Urgent help please...

    Maryrhire910 I am sorry that you are facing difficulty downloading and installing Photoshop Elements 12.  Are you downloading the installation files from Download Photoshop Elements products | 13, 12, 11, 10?  If so what specific error are you receiving?

  • Load XML in intranet ? urgent help please...

    Dear friends, I need urgent help: I have a CAYIN screen (which lets me display evetns, etc) and gives me the option of loading/displaying a FLASH (SWF) file, well, I need this SWF to load some XML data ("texto.xml") but  seems that when the CAYIN program which executes flash, does not allow the SWF to find the XML in the same folder...
    Then I tried many ways to load the XML file with no success till now. Some tries are :
    obj_xml.load("\\192.168.0.100\media\texto.xml")
    obj_xml.load("\media\texto.xml")
    obj_xml.load("texto.xml")
    obj_xml.load("../media/texto.xml")
    obj_xml.load("\\media\texto.xml")
    obj_xml.load("file:\\192.168.0.100\media\texto.xml")
    obj_xml.load("..\\192.168.0.100\media\texto.xml")
    I guess I am writting something wrong or forgetting something. Would anyone please help me ? because these files are in an internal server "192.168.0.100" (intranet).
    Urgent help please, thanks in advance,

    if the swf is in a directory with subdirectory media which contains texto.xml, use:
    obj_xml.load("media/texto.xml")

  • Urgent help need:How inventory system and fulfillment system work

    Hi Every one ,
    I have an requirement to work on inventory and fulfillment system,below are my questions,
    1)I have stock level quantity for an sku is 2 ,if one user done with his order with quantity of 2 then how we can show quantity to the second customer (if stock not available we gone loss the business )
    how we can handle this ?
    2)There are few orders are completed(if some are orders are having quantity available in stock some or backorders)
    here how the fulfillment system understand those orders and how it will update the inventory.
    Could you please any one help me how to work on above requirements or else give me some other solutions to full fill above .
    Regards,
    Jyothi Chidurala
    Edited by: Jyothi.mj on May 22, 2013 5:08 AM
    Edited by: Jyothi.mj on May 23, 2013 4:28 AM

    >
    1)I have stock level quantity for an sku is 2 ,if one user done with his order with quantity of 2 then how we can show quantity to the second customer (if stock not available we gone loss the business )
    how we can handle this ?
    you can always call InventoryManager.AVAILABILITY_STATUS_IN_STOCK to check whether the item is available in inventory , It is the business call if item not available how they want to handle this .
    hope this helps

  • URGENT HELP PLEASE (MY N73 sometimes do not recive...

    i am facing this problem with my nokia n73 , sometimes if i try to open the inbox from the main window (i click on messages) , the inbox will not opened it will stay on the main window and if there is any one how sent me a message it will not be delivered even no delivery report will be shown on the sender mobile , but if i turn off then turn it on all the messages will be display, please i need your urgent help, because i send my mobile to nokia store to install a new software just before one month. because it used to hang when i use the camera.

    hi! i went to nokia yesterday and they said that the only solution is to upgrade the software but you need to do a back up coz all the data will be lost. My phone is good condition now and i can received messages without restarting my phone over and over again...
    give me also a update on after you send it to nokia center...for upgrading new software.

  • Help regarding how to show total and grand total

    hi all
    please help me to show the total / grand total fund wise
    i m giving final output that i want
    which functions may i use .
    following is my query
    SELECT MUT_NAME , NATURE , BROK_TYPE ,sum(BROKERAGE) brokerage   FROM (
    SELECT MUT_NAME , NATURE , BROK_TYPE ,BROKERAGE  FROM (
      select mf.mut_name , si.nature ,'UPFRONT' BROK_TYPE ,  sum(up1.paid_brok)  BROKERAGE from upfront_paid up , upfront_paid_dtl upd , upfront_pr up1 , scheme_info si , mut_fund mf
      where up.slab_id = upd.slab_id
      and up.SLAB_ID = up1.paid_slab_id
      and up.sch_code = si.sch_code
      and si.mut_code = mf.mut_code
    -- and si.mut_code = 'MF004'
      group by   grouping sets (  (mf.mut_name , si.nature) ) ROLLUP(MF.MUT_NAME,SI.NATURE)
      UNION ALL
      select mf.mut_name , si.nature ,'TRAIL' BROK_TYPE ,   sum(up1.paid_brok)    BROKERAGE  from TRAIL_paid up , TRAIL_paid_dtl upd , TRAIL_pr up1 , scheme_info si , mut_fund mf
      where up.slab_id = upd.slab_id
      and up.SLAB_ID = up1.paid_slab_id
      and up.sch_code = si.sch_code
      and si.mut_code = mf.mut_code
    -- and si.mut_code = 'MF004'
      group by  grouping sets (  (mf.mut_name , si.nature) ) ) ROLLUP(MF.MUT_NAME,SI.NATURE)
    UNION ALL
    SELECT 'TOTAL ' MUT_NAME , ' ' NATURE , ' ' BROK_TYPE ,SUM(BROKERAGE)  FROM (
      select mf.mut_name , si.nature ,'UPFRONT' BROK_TYPE ,  sum(up1.paid_brok)  BROKERAGE
      from upfront_paid up , upfront_paid_dtl upd , upfront_pr up1 , scheme_info si , mut_fund mf
      where up.slab_id = upd.slab_id
      and up.SLAB_ID = up1.paid_slab_id
      and up.sch_code = si.sch_code
      and si.mut_code = mf.mut_code
      --and si.mut_code = 'MF004'
      group by  grouping sets (  (mf.mut_name , si.nature) ) ROLLUP(MF.MUT_NAME,SI.NATURE)
      UNION ALL
      select mf.mut_name , si.nature ,'TRAIL' BROK_TYPE ,   sum(up1.paid_brok)    BROKERAGE  from TRAIL_paid up , TRAIL_paid_dtl upd , TRAIL_pr up1 , scheme_info si , mut_fund mf
      where up.slab_id = upd.slab_id
      and up.SLAB_ID = up1.paid_slab_id
      and up.sch_code = si.sch_code
      and si.mut_code = mf.mut_code
    -- and si.mut_code = 'MF004'
      group by  grouping sets (  (mf.mut_name , si.nature) ) ) ROLLUP(MF.MUT_NAME,SI.NATURE)))
    GROUP BY grouping sets (MUT_NAME),( NATURE ),( BROK_TYPE)
    ORDER BY MUT_NAME , NATURE , BROK_TYPE 
    Sl. No.     Fund House     Fund Type     Brokerage Type     "Type-wise
    Commission "     Gross Commission
    (1)     Fidelity Mutual Fund     Equity     Upfront Commission     xxx     
                   Trail     xxx     
                   Others     xxx     
              Debt     Upfront Commission     xxx     
                   Trail     xxx     
                   Others     xxx     
    T O T A L :                         xxxxx
    (2)     Franklin Templeton Mutual Fund     Equity     Upfront Commission          
                   Trail          
                   Per Form          
                   AUM Linked          
                   SIP Advance Annual Brokerage          
                   Others          
              Debt     Upfront Commission          
                   Trail          
                   Others          
    T O T A L :                         xxxxx
    CONSOLIDATED TOTAL COMMISSION :                         xxxxxany help appriciated.

    how can i use compute in procedure
    actually i am giving the output from query to ref_cursor and from front end ( .NET) they are fetch rows and show the output.
    i want output as fallows
    fund name -- nature --- brok type --- brokerage
    1] fidelity     equity     upfront       2000
                 equity     trail         1000
                 debth      upfront       1500
                 debth      trail         500
      Fidelity                            5000
    2] abc       --                     
    so on hope this clears you
    Message was edited by:
    Pankaj M

  • URGENT HELP PLEASE - drop index hangs on SAP

    Hi all,
    OS = Linux
    DBVersion = Oracle10.2.0.2
    Need some urgent help advise please on how to get around this problem.
    On a SAP system, am trying to drop six indexes, largest is 300MB and smallest is 50MB.
    I tried running drop index sapusername.index_name on the 50MB index via SQL*Plus and it seems to be taking forever. Can anyone please suggest if there is anything I can check on the database on why it is taking such a long time?
    I can leave it to run overnight but worried that when I come back the next day, it will still be hanged. Is there any quick way of dropping the index, .i.e. drop immediate ... :-)
    Am not using SAP's BRTOOLs as it is also hanging from there and the SAP-ADMIN had approved for the DBA to drop it from our end instead.
    Any response and advise on this will be very much appreciated.
    From Google'ing, I found some that mentioned that the fault could be because of the existence of the constraints on the table that I am dropping the index of.
    Checking the table, it has 17 SYS_ named constraints. None of these constraints have INDEX_NAME that refers to the indexes that am dropping.
    Should I disable the constraints and then run the drop index again?
    Thanks in advance.
    Edited by: user649596 on Apr 13, 2010 11:49 PM

    Should I disable the constraints and then run the drop index again?NO, certainly not !!
    Ask SAP Support on what methods you should use to diagnose the "hang" and what your next step(s) should be.
    Hemant K Chitale

  • HELP PLEASE How do I remove my credit info from iOS7. "None" is not there anymore as a selection btw help.

    Please help idk how to remove credit information the "none" selection is gone now ios7 plz help

    Yes it is...

  • Urgent Help. How to send the email in HTML format in Version 4.6c

    Hi,
      Please help me how to send a mail in HTML format with logo and specified format. Is it possible to send the SAPscript or Smartform in HTML format to external mail address.  The logo and the format is very important in this e-mail.
      quick response will help me better.
    Regards,
    Naidu

    Here is a sample program which emails HTML in the body.  Of course you can put an HTML tag in there that would point to the logo on some server(internet).  Notice we are just putting the HTML code in the MAILTXT table,  This is how we do it at my company.
    report zrich_0002.
    data: maildata   like sodocchgi1.
    data: mailtxt    like solisti1 occurs 10 with header line.
    data: mailrec    like somlrec90 occurs 0  with header line.
    start-of-selection.
      clear:    maildata, mailtxt,  mailrec.
      refresh:  mailtxt, mailrec.
      perform build_text_message.
      perform build_receivers.
      perform send_mail_nodialog..
    *      Form  BUILD_TEXT_MESSAGE
    form build_text_message.
      maildata-obj_name = 'TEST'.
      maildata-obj_descr = 'Test Subject'.
      mailtxt  = '<html>'.
      append mailtxt.
      mailtxt  = '<head>'.
      append mailtxt.
      mailtxt  = '<title>Untitled Document</title>'.
      append mailtxt.
      mailtxt  = '<meta http-equiv="Content-Type" content="text/html;'.
      append mailtxt.
      mailtxt  = 'charset=iso-8859-1">'.
      append mailtxt.
      mailtxt  = '</head>'.
      append mailtxt.
      mailtxt  = '<body>'.
      append mailtxt.
      mailtxt  = '<div align="center"><em><font' .
      append mailtxt.
      mailtxt  = 'color="#0000FF" size="+7" face="Arial,'.
      append mailtxt.
      mailtxt  = 'Helvetica, sans-serif">THIS'.
      append mailtxt.
      mailtxt  = '  IS A TEST </font></em><font' .
      append mailtxt.
      mailtxt  = 'color="#0000FF" size="+7" face="Arial,'.
      append mailtxt.
      mailtxt  = 'Helvetica, sans-serif"></font>'.
      append mailtxt.
      mailtxt  = '</div>'.
      append mailtxt.
      mailtxt  = '</body>'.
      append mailtxt.
      mailtxt  = '</html>'.
      append mailtxt.
    endform.
    *      Form  BUILD_RECEIVERS
    form build_receivers.
    *  mailrec-receiver = '[email protected]'.
      mailrec-rec_type  = 'U'.
      append mailrec.
    endform.
    *      Form  SEND_MAIL_NODIALOG
    form send_mail_nodialog.
      call function 'SO_NEW_DOCUMENT_SEND_API1'
           exporting
                document_data              = maildata
                document_type              = 'HTM'
                put_in_outbox              = 'X'
           tables
                object_header              = mailtxt
                object_content             = mailtxt
                receivers                  = mailrec
           exceptions
                too_many_receivers         = 1
                document_not_sent          = 2
                document_type_not_exist    = 3
                operation_no_authorization = 4
                parameter_error            = 5
                x_error                    = 6
                enqueue_error              = 7
                others                     = 8.
      if sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      endif.
    endform.
    Regards,
    Rich Heilman

  • Storing rows returned back in Memory.Urgent Help please

    I have a method is thats all information from the Database and I need to hold this data
    in a HashMap of some sort of data structure
    Lets suppose this result set returns 5 rows.I need to hold all 5 rows in a datastructure.
    The variable f_OrderID is the principal and this should return back all values associated with it.
    I cant use HashMap as the key:f_OrderID is always the same,
    Key f_orderID
    Value :f_EffTs,f_ClrAcct f_MsgSeqNum
    Please can anyone help me how to store this in memory,
    using the same f_OrderID but with different values?
    public void getAcctChgDataFromDB(String orderNo,String indicator){
         if((rs == null) ){
                       logger.equals("No rows returned for Order No " + orderNo);
                       throw new AcctChgException("No rows returned for Order No " + orderNo );
                  }else
                                 while(rs.next()){
                                      f_OrderID  = rs.getString("FixOrderID");
                                      f_EffTs    = rs.getString("EffTs");
                                      f_ClrAcct  = rs.getString("ClrAcct");
                                      f_MsgSeqNum = rs.getString("FixMsgSeqNum");
             } catch (Exception e) {
                   e.printStackTrace();
       

    well i fell
    List<Map<String,Object>> or
    List<CustomDTOBean>could be a specific data structure which you can look for.
    where List would have reference to 5 Objects(Row) and each object could be a Map or a CustomDTO.If we consider map it would be like structure something like
    key=TABLE_COLUMN_NAME
    value=TABLE_COLUMN_VALUE

  • Urgent help please with MIDI pedal

    I just got an old awesome midi pedal called the X-15 Ultrafoot.
    The pedal has two expression pedals, and 10 pushbuttons/pads. (and two buttons to cycle through additional banks, and a "mode" and "bypass" button)
    Somebody please help I am on the verge to having amazing control.
    What I want to do is have each pushbutton be assigned to a parameter, which is easy to program. Then I want to make the expression pedal(s) also be assigned to that last selected parameter. How do I do this?
    How can I make the expression pedals control over the parameter remain exclusive to just the last selected parameter?!
    Somebody save me please thanks

    mr kglad i really hope my ( too many replies and questions ) don't bother you.. but please excuse me if they sound foolish or something im a beginner as mentioned...
    There must be something wrong with whatever im doing ... ( im so desperate and since you are the only one who replied on me i really need your help please.. )
    1- i published the first fla as a swf (10.3 ) with a button with the code you've given me )
    2- i published the second fla as a swf (10.3) with another button with the same code you've given me )
    3- i made a main page where there are two buttons.. one for english and one for foreign language
      English button with this code :
    Engbutton.addEventListener(MouseEvent.CLICK, fl_ClickToLoadUnloadSWF_4);
    import fl.display.ProLoader;
    var fl_ProLoader_4:ProLoader;
    //This variable keeps track of whether you want to load or unload the SWF
    var fl_ToLoad_4:Boolean = true;
    function fl_ClickToLoadUnloadSWF_4(event:MouseEvent):void
        if(fl_ToLoad_4)
            fl_ProLoader_4 = new ProLoader();
            fl_ProLoader_4.load(new URLRequest("englishformFIN.swf"));
            addChild(fl_ProLoader_4);
        else
            fl_ProLoader_4.unload();
            removeChild(fl_ProLoader_4);
            fl_ProLoader_4 = null;
        // Toggle whether you want to load or unload the SWF
        fl_ToLoad_4 = !fl_ToLoad_4;
    and the other button with the same code ( the second fla )
    IT DOESNT WORK WHEN I TEST THE MOVIE.. the return buttons nor the main ones..why why why why why... ???
    i really need your help
    THANK YOU in advance

Maybe you are looking for