How to get error message on the same jsp

Hi guys,
I have a login.jsp page and I want an error message to be printed "login failed" in the same jsp page when the user enters the wrong credentials.
Any ideas on how to do that is highly appreciated.
Thanx in advance.sri

If you use struts it would have been a lot easier and better than only JSP.
In struts :
Add this line in ur JSP page
<html:errors/>
In ur Action servlet ex: LoginAction.java add thsi code extract in the appropriate position ...
ActionErrors errors = new ActionErrors();
errors.add(ActionErrors.GLOBAL_ERROR, new ActionError("error.user.wrong"));
if (!errors.isEmpty())
saveErrors(request, errors);
But in JSP do something like this:-
If authentication fails then post to the same JSP and put this code in the reqd position...
<%
String postFlag=request.getParameter("postFlag");
if(postFlag.equals("FAILED"))
%>
LOGIN FAILED
<%
%>
So for JSp simply set the request parameter  (postFlag)  to SUCCESSFUL/FAILED  from your servlet.

Similar Messages

  • How to get error message from the BPEL process

    Hi,
    We have some BPEL processes running in BPEL PM 10g. If any of these BPEL process fails, we would like to get the error message caused this process to fail.
    Please let me know where does the BPEL proccess holds (table/file) these details. or is it possible to get the error message programatically.
    Thanks

    You can go through below link that can help
    http://download.oracle.com/docs/cd/B31017_01/integrate.1013/b28981/faults.htm#sthref1186
    http://bpelknowledge.blogspot.com/2010/07/error-conditions-that-cannot-be-handled.html
    http://blog.whitehorses.nl/2009/11/03/error-handling-in-soa-suite-11g/
    Hope it helps!!
    Thanks
    AJ

  • I keep getting error messages on the calendar since downloading the new software on my IPAD2. It either says "cannont save event. That event does not belong to that event store" or I get an error message that says that no calendar "has been set".

    I keep getting error messages on the calendar since I downloaded the new software on my IPAD2.  When I try to add a new event it either says "That event does not belong to that event store" or it says "the calendar has not been set".  Does anyone know what these messages mean or how to address this?

    I'm getting the same issue on my ipad2...I set up a new calender and now I keep getting this error message....how do I fix this?

  • How to give error message for the screen element text field when wrong i/p

    How to give error message for the screen element text field when wrong i/p
    when wrong input given
    eg. 
    I have a text box with SBOOK-CARRID
    so when user give wrong entry in text box i.e LG
    then I should give some error stating that the the input is invalid or not available ,
    now it showing the error of standard messages,
    i want manual message to be displayed when error comes.
    Thank you,
    Regards,
    Jagrut Bharatkumar Shukla

    Hi all,
    Thank you for your valuable reply,
    but the thing is that its a screen field,
    i.e text box not a selection screen
    i created in screen layout
    with name sbook-carrid
    now i want to get error message display if wrong i/p is given
    thank you.
    Regards,
    Jagrut bharatkumar Shukla,

  • Great Problemes after installing Yosemite (10.10.2 ) with Photoshop CS6....The program crashes --last time 10 times during my work session..wacomtable doesnt work..it is slow...and get error messages about the graphic card....It s a Terror to work with my

    great Problemes after installing Yosemite (10.10.2 ) with Photoshop CS6....The program crashes --last time 10 times during my work session..wacomtable doesnt work..it is slow...and get error messages about the graphic card....It s a Terror to work with my beloved Photoshop!

    The Yosemite upgrade very often damages existing Photoshop installations.  Thank Apple for that.
    You need to uninstall and re-install Photoshop, then apply all the Photoshop upgrades from scratch.
    But first, give us details about your setup:
    BOILERPLATE TEXT:
    Note that this is boilerplate text.
    If you give complete and detailed information about your setup and the issue at hand,
    such as your platform (Mac or Win),
    exact versions of your OS, of Photoshop (not just "CS6", but something like CS6v.13.0.6) and of Bridge,
    your settings in Photoshop > Preference > Performance
    the type of file you were working on,
    machine specs, such as total installed RAM, scratch file HDs, total available HD space, video card specs, including total VRAM installed,
    what troubleshooting steps you have taken so far,
    what error message(s) you receive,
    if having issues opening raw files also the exact camera make and model that generated them,
    if you're having printing issues, indicate the exact make and model of your printer, paper size, image dimensions in pixels (so many pixels wide by so many pixels high). if going through a RIP, specify that too.
    A screen shot of your settings or of the image could be very helpful too,
    etc.,
    someone may be able to help you (not necessarily this poster, who is not a Windows user).
    Please read this FAQ for advice on how to ask your questions correctly for quicker and better answers:
    http://forums.adobe.com/thread/419981?tstart=0
    Thanks!

  • How to get two parameters in the same line of selection screen?

    hello
    i need to get my selection csreen like bellow.
    r1 radiobuttion  -some space --p1 parameter
    i should not get the parameter in the next line of  radiobuttion.
    how to get two parameters in the same line of selection screen?

    hi....
    modify the following code
    it will work
    SELECTION-SCREEN BEGIN OF BLOCK SL1 WITH FRAME TITLE TEXT-003.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 10(15) TEXT-001
                     FOR FIELD P1.
    SELECTION-SCREEN POSITION POS_LOW.
    PARAMETERS : P1 TYPE   C USER-COMMAND R2 RADIOBUTTON GROUP R2 DEFAULT 'X',
      P2 TYPE SCARR-CARRNAME,
      P3 TYPE CHAR1 RADIOBUTTON GROUP R2.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK SL1.

  • I am trying to download the latest iTunes update.  Keep getting error message stating "The folder path 'My Documents' contains an invalid character".  I can't uninstall iTunes for the same reason.  HELP!

    I am trying to download the latest iTunes update; keep getting error message that says "The folder path 'My Documents' contains an invalid character".  This also happens when I try to uninstall iTunes.  HELP!

    OK, never mind!  I saw another question on the right side that addressed the problem, and it worked perfectly!  Went to Major Geeks' page, downloaded the Windows Installer Cleanup Utility, and was able to reinstall the updated version of iTunes!  This community is super!

  • How to set error message inside the loop...module pool

    Dear all,
         Am creating Table Control without wizard. In that i am looping the values, that is, Once if i entered 5 digit values means, 12345-08... the values should be stored in z-table like this 12345,12346,12347,12348 . That is 5-8 it as to update in z table. for this i createdloop at itab and inside that i written a code to count the value and all. and also its clearly updating the value in ztable too. now i want to know, if once again i entered the same value means, like 12345-08.. it as to show error messge.I dont know how to set the condition with error message inside the single loop .... Its all comes under module pool program.
    Thanks,
    Santhosh.R

    If i understood your doubt, here goes the answer.
    LOOP AT itab INTO wa_itab.  " This is your loop
      l_tabix = sy-tabix. "l_tabix receives the line of the loop
      READ TABLE itab WITH KEY itab = wa_itab.  "itab is the same tab of your loop
      IF sy-subrc EQ 0 AND l_tabix NE sy-tabix.    "Here the sy tabix have the value of the read table.
    *     Here you do your error treatment.
      ENDIF.
    ENDLOOP.
    Explanation: When you are looping your internal table, you use a READ TABLE to see the already recorded registers. If the read table finds one register (sy-subrc EQ 0) and the this register is not the one of the current line (l_tabix NE sy-tabix). It means you have a duplicated register.
    Maybe there is someway easier to do this, but this is what i thought now.
    I hope this was your doubt hehe.
    Thales Schmidt

  • CcBPM, how to capture error message in the exception branch ?

    Hi,
    Can I capture error message in the exception branch ? how to do that ?
    because i want to raise the alert including with the error message ?
    Cheers
    Fernand

    Hello Fernand,
    I hope at the end of this you may get some knowledge on Alerts.
    /people/michal.krawczyk2/blog/2005/09/09/xi-alerts--step-by-step XI:Alerts step-by-step. (fundamental Basic)
    /people/sap.user72/blog/2005/11/24/xi-configuring-ccms-monitoring-for-xi-part-i CCMS Monitoring for XI. (CCMS monitoring for XI is enough later
    we configure to Adapter Engine).
    /people/aravindh.prasanna/blog/2005/12/23/configuring-scenario-specific-e-mail-alerts-in-xi-ccms-part--1 Configuring scenario specific E-mail alerts in XI-CCMS: Part-1
    (This is Important)
    /people/aravindh.prasanna/blog/2005/12/24/configuring-scenario-specific-e-mail-alerts-in-xi-ccms-part-2 Configuring scenario specific E-mail alerts in XI-CCMS: Part-2
    /people/aravindh.prasanna/blog/2006/02/20/configuring-scenario-specific-e-mail-alerts-in-xi-ccms-part-3 Configuring scenario specific E-mail alerts in XI-CCMS: Part 3
    /people/federico.babelis2/blog/2006/05/03/solution-manager-cen-and-alerting-configuration-guide-for-dummies Solution Manager CEN and Alerting configuration (Advanced)
    Please reward points if it is useful...
    Thanks,
    Satya Kumar

  • I have air port express 802.11n and imac ver 10.7.5.  When I try to set up my wifi I get error message 'that the version mac os x is not supported' Help?

    I am trying to set up wifi using air port express 802.11n version 1.3 on my imac os x ver 10.7.5.  Get error message Air port can't be installed on this disk that the ver of mac not supported - Help????

    Please check the model number on the side of the AirPort Express in the faint print. It will start with an "A" followed by four numbers, as in A x x x x.
    Post back with your findings.

  • How to display error message on the screen

    I am new to WD world and need all possible steps to resolve the following issue.
    I need to display the error message on the screen if any required field is empty when user click on SAVE button.
    I have set the attribute GO_MESSAGE_MANAGER and check the both box for  PUBLIC and REFTO and set the associated type IF_WD_MESSAGE_MANAGER under COMPONENTCONTROLLER.
    Under the method of COMPONENTCONTROLLER set the value WD_THIS-GV_NAV_FORBIDDEN = IV_NAV_FORBIDDEN. Which is type IMPORTING of associated type WDY_BOOLEAN.
    GV_NAV_FORBIDDEN has been set to attribute WDY_BOOLEAN in the COMPONENTCONTROLLER.
    Under the ACTION (on SAVE button) of my default view (VW_DEFAULT) I am doing the following.
    IF lv_f_name IS INITIAL
        CALL FUNCTION 'BALW_BAPIRETURN_GET2'
          EXPORTING
            type   = 'E'
            cl     = 'HRRCF0002'
            number = '020'
          IMPORTING
            return = ls_return.
        lv_message = ls_return-message.
    NEED TO PUT CODE TO PASS IT ON
    ENDIF.

    The thing I can not figure out is the input parameter of this call. My CONTEXT has a node1->node2->node3->f_name.
    CALL METHOD lo_message_manager->report_attribute_error_message
      EXPORTING
        message_text              = lv_message
        element                   = HOW WIILL YOU FIND THE VALUE OF THIS
        attribute_name            =
       params                    =
       msg_user_data             =
       is_permanent              = ABAP_FALSE
       scope_permanent_msg       = CO_MSG_SCOPE_CTXT_ELEMENT
       msg_index                 =
       cancel_navigation         =
       is_validation_independent = ABAP_FALSE     .
    wd_comp_controller->set_navigation_forbidden( iv_nav_forbidden = abap_true ).

  • HT3529 How to delete multiple messages at the same time?

    I'm new with and IPhone I try to delete multiple messages at the same time. and I can't find how to do this.

    Email messages? Tap the edit button...tap each message you want to delete...hit delete...once in trash, tap edit, then tap delete all.

  • 1 distinct type of ORA- errors - "How to get error message"

    How do I configure Grid Control to send the full error message on the "Generic Alert Log Error Status" alert instead of just having it tell me there has been an error found?

    You need to add the rule:
    Click
    Preferences
    Rules
    Database Availability and Critical States, Click Edit
    Metrics, Add.
    Select: Generic Alert Log Error
    Continue ... etc .etc
    Hope this helps
    Daryl
    PS. I remove the Generic Alert Log Error Status -- dont need that extra email -- its useless.
    Note too that you have to clear these alerts manually via the "Clear Alert" button or do a whole wack of them via the Alerts->Warnings tab, the select all, clear.

  • Trying to uninstall and reinstall iTunes on Windows 7, but half way through getting error message saying the older version could not be removed. I have uninstalled everything that goes along with it

    I also get a message saying:
    the feature you are trying to use is on a network that is unavailable. Click OK to try again or enter an alternate path to a folder containing the insallation package "iTunes.msi" in the box below
    When I click OK, get a message daying:
    (file name) cannot be found Verify that you have access to this location and try again or try to find the installation package "iTunes.msi" in a folder from which you can install the product iTunes
    I have no idea what to do!! Any help??

    the feature you are trying to use is on a network that is unavailable. Click OK to try again or enter an alternate path to a folder containing the insallation package "iTunes.msi" in the box below
    Download the Windows Installer CleanUp utility from the following page (use one of the links under the thingy on the Major Geeks page):
    http://majorgeeks.com/download.php?det=4459
    To install the utility, doubleclick the msicuu2.exe file you downloaded.
    Now run the utility ("Start > All Programs > Windows Install Clean Up"). In the list of programs that appears in CleanUp, select anyiTunes entries and click "Remove", as per the following screenshot:
    Quit out of CleanUp, restart the PC and try another iTunes install. Does it go through properly this time?

  • How to get form input in the same portlet using pageflow

    Hi this is premkumar
    i created 2 portlet in a portal how to get form input in the sampe portlet using
    pageflow
    help as early as possible

    Do to the complexity of the program we need to run it with sequences.  This is because we need to aquire data with DAQ until it reaches a certain point and then stop collecting so that it can do its process (only once for all times criteria is met), and then loop around till again collecting after DAQ drops back below certain point looking to once again reach that point.  Another flat sequence is going outside of this where I want to put the prompt and have a user input to affect how many times that that the inner loop is run (No a For Loop instead of the while loop will not work either for other reasons). 
    I just want to know if after the program starts you can have a user input that will change the effect of the rest of the programs action based on the number inputed.

Maybe you are looking for

  • How can I alphabetize my iTunes library again?

    I have over 100 songs by the same singer in my iTunes library. They were once all in alphabetical order, but I notice now that 10 or 15 songs have positioned themselves in front of the remaining songs, which remain in alphabetical order. How can I ge

  • Convert YYYY-MM-DDTHH:mm:ss.000Z  format to Date

    Hi, I have a varchar2 field which stores date in the following structure '2009-12-22T23:45:57.000Z' and need to convert to a date format 'MM-DD-YYYY HH:MM:SS' How can I achieve this? Thanks VJ

  • Changing an iPod Touch to a new Apple ID- alternative(s) to rebuying apps?

    My son bought an iPod Touch, and since he wasn't yet 13, I've let him use my Apple ID for his app purchases. But I don't want him to use my ID forever, and since he's turning 13 soon, I thought I'd get him his own ID. But I was just now told that, si

  • Solution for job work material

    Dear All, Please provide me what is the best solution or procudure for job work material (for production), also confirm me what effect of component price in Bom. Thanks

  • Need Script for Videopodcast.

    Looking for Script  for iTunes, to extract audio segment from Vide podcast  and save it for iPod Nano. can' find it in dougscripts.com/iTunes. Used to have that script but lost due to update my OS 10 to 10.9.4 Thank you! Igor.