Messages and redirect

I am using IBM Websphere and I have a page that does some logic when the page loads up using IBM's ScriptCollector preRender tag. If that logic for some reason determines that I need to go my customer help page, the only way I can go there is to do facesContext.getExternalContext().redirect("customer_help.jsf");.
This is fine, but I cannot set any messages on the facesMessage to display on the customer help page. Is there a way I can get these messages to display? Here is an example of if I get an error, I am doing this:
FacesMessage message = MessageFactory.getMessage(facesContext,"Forgot_Password_Email_Not_Found");     
facesContext.addMessage("",message);
facesContext.getExternalContext().redirect("customer_help.jsf");This will take me to customer help, but it does not display the messages.
Thanks!!!!!

There are number of ways to pass parameters to your customer_help page. Below are psuedocode for some of them.
1) Pass message via URL params (msg = invalidUser) and in your customer_help page, if (msg==invalidUser) { do something }
2) Instead of Redirecting you can use Forward
3) Set variable in SessionScope and remove it in customer_help page.
Currently in my application I have this working using requestScope but then again my application uses JSF-Struts integration (struts-faces) library.

Similar Messages

  • I keep getting an error message and redirected to yahoo, despite having been in the site briefly using my default browser. any ideas?

    Google is my default browser. I type in a search, click on the link, and go to the site, Sometimes I get re-directed immediately and other times I am able to navigate for a few seconds before being re-directed. I've tried changing the settings in the "about.config" area to make sure that Google does not appear anywhere. I've removed Yahoo from my applications (since doing that Bing now comes up anytime I open more than one browser window). I've looked for malware from Spigot and I can't find You Tube Downloader. In short, I've followed every suggestion that I can find. It hasn't fixed the problem, and has created a new one with Bing. Any other ideas??

    It could be the work of one of your add-ons, or even add / mal-ware.
    Look thru your add-ons list and make sure you know what each one is
    and what it does. Also, check the programs that are on your computer
    '''Windows:''' Start > Control Panel > Uninstall Programs.
    '''Mac:''' Open the "Applications" folder
    '''Linux:'''
    * [http://www.freesoftwaremagazine.com/articles/see_all_your_installed_applications_ubuntu_unity Ubuntu Unity]''' {web link}
    * Xfce: Applications Menu category sections
    * options depends on the package manager and the desktop environment
    Go thru the list. If you find something that you don't
    know what it is, use a web search.
    '''[https://support.mozilla.org/en-US/kb/troubleshoot-firefox-issues-caused-malware Troubleshoot Firefox Issues Caused By Malware]''' {web link}

  • Session Time Out and Redirect to login page - urgent

    My problem is I want to display alert message and redirect to the home page when session expires.
    Iam using TimeOutListener in my application as follows.
    public PhaseId getPhaseId() {
    return PhaseId.ANY_PHASE;
    public void beforePhase(PhaseEvent phaseEvent) {
         FacesContext facesContext = phaseEvent.getFacesContext();
    HttpSession sessionx = (HttpSession)facesContext.getExternalContext().getSession(false);
    if(sessionx == null) {
         FacesUtils.sessionCheck = true;
    String ampee = (String)((HttpServletRequest)FacesContext.getCurrentInstance().getExternalContext().getRequest()).getAttribute("ampee");
    if(ampee != null && ampee.equals("ampee")) FacesUtils.sessionCheck = false;
    if(phaseEvent.getPhaseId() == PhaseId.RENDER_RESPONSE) {
         if(FacesUtils.sessionCheck){
         facesContext.getApplication().getNavigationHandler().handleNavigation(facesContext, "", "sessionExpired" );
         FacesUtils.sessionCheck = false;
    ExternalContext externalContext = FacesContext.getCurrentInstance().getExternalContext();
              HttpServletRequest request = (HttpServletRequest) externalContext.getRequest();
              HttpSession session = request.getSession();
              if (session.isNew()) {
                   try {
                   String errorPageURL = externalContext.getRequestContextPath() +
                   "/index.jsf?errorpage=true";
                   externalContext.redirect(errorPageURL);
                   }catch(Exception e){
                        e.printStackTrace();
    here i have appended param errorPage=true...
    in jsp page i have used following code to get the param<% if(request.getParameter(errorPage)!=null && request.getParameter(errorPage).equals("true")){%>
    <script>alert("session expired");</script>
    <%
    %>
    Can any one help me how to Implement this?
    Do u know another way pls let me know...

    Consider using the Javascript setTimeout() function in conjunction with HttpSession#getMaxInactiveInterval(). The HttpSession#getMaxInactiveInterval() returns the remaining seconds of the session lifetime.
    Basic example:<script>
        setTimeout("alert('The session will timeout after one minute.')", <%= (session.getMaxInactiveInterval() * 1000) - 60000 %>);
    </script>I've given the client one minute (60000ms) extra time space to respond accordingly.
    Use this in combination with the following head:
    <meta http-equiv="refresh" content="<%= session.getMaxInactiveInterval() %>;url=login.jsf">which will redirect to login.jsf if the session is timed out. You can also redirect to another page of your taste, e.g. error.jsf or so.

  • When I want to DL an app and after I enter my ID and password , DL starts . But then a message shows up and want me to verify my payment info. And redirects me to that page . Every thing I do on that page it doesn't work and then I can't DL.

    When I want to DL an app and after I enter my ID and password , DL starts . But then a message shows up and want me to verify my payment info. And redirects me to that page . Every thing I do on that page it doesn't work and then I can't DL.

    Do this on your iTunes program on the computer instead. Your Credit Card used on the profile is probably maxed.

  • Urgent: how to Logoff and redirect to the login screen from WebDynpro appli

    Hi,
    i want to logoff and redirect to to the login page.
    i use WDClientUser.forceLogoffClientUser([_"what should be the code here"_]);
    If i pass null as the url, it will terminate and default message will be shown (it will not go to logon screen)
    I want to logoff and navigate to customize login page.
    I don't know from which server the request is from dev, Qa or some other system.
    I can use WDClientUser.forceLogoffClientUser("http://dev"); but it doesn't work with QA.
    i will be really appriciate we suggest me regarding this. Its urgent please send for responce ASAP.
    Thanks
    NSM

    Hi,
    use the following code to get the url
    String hostName = WDProtocolAdapter.getProtocolAdapter().getRequestObject().getServerName();
              int port = WDProtocolAdapter.getProtocolAdapter().getRequestObject().getServerPort();
              StringBuffer url = new StringBuffer("http://");
              url.append( hostName );
              url.append(":");
              url.append(port);
    WDClientUser.forceLogoffClientUser(url.toString());
    Regards
    Ayyapparaj

  • How to create artifact and redirect

    HI ,
    I need to implement a use case where there are two Access Manager(7.0) (first named as AM1, other AM2) and an tomcat server. Where AM1 is in some other domain and has trust relationship with AM2. Also AM2 and tomcat are in the same domain.
    Use case:
    When the user is authenticated by 'AM1' I want 'AM1' to create artifact and redirects that artifact to the servlet in tomcat server, This servlet will then send request to AM2 which will send this artifact through SAML request to AM1, AM1 will process the artifact and send SAML assertion through SOAP over https.
    I know this can be implement using SAMLClient API. but I dont want to install jar files on 'AM1'.
    Is there any other way ? If its just a configuration issue please give me the details. I tried following Access Manager documentation and was able to created artifact using SAMLAwareservlet but it fails before redirecting to my servlet.
    Following is the Message I get
    "Failed to Create SSO token"
    Please help,
    Thanks

    It all depends on the current settings of the current SSID.
    You cannot configure a web redirect with another security than none or a pre-shared key on layer2.
    If you are using 802.1x, you can go with the splash page : http://www.cisco.com/en/US/partner/products/ps6366/products_configuration_example09186a0080956185.shtml
    I don't see another friendly method for your users ...
    Nicolas.
    ===
    Don't forget to rate answers that you find useful

  • Show message before redirect

    Hi Guys,
    I am facing a problem that I do not know how to solve.
    I have a method that adds a message to FacesMessage and redirect to another window after saving the record.
    The problem is that the redirect comes before showing the af:message.
    I think that is because the partialTriggers of the af:messages is the button that is calling the method that adds a message to FacesMessage.
    Is there any way to make like a waiting action of clicking the ok button of af:messages in order to redirect?
    Thanks a lot.
    Best Regards,
    Ricardo Morais
    That is my code:
    public String efetuarGravacao() {
    try {
    PontoDeVendaFacade pontoDeVendaFacade = ServiceLocator.getInstance().getEJB(PontoDeVendaFacade.class);
    AssociarEstruturaComercialBean estruturaComercial = (AssociarEstruturaComercialBean)ADFContext.getCurrent().getViewScope().get("estruturaComercial");
    pontoDeVenda.setUnidadesDeAtendimento((estruturaComercial.getItensAssociados()));
    montarPontoDeVenda(pontoDeVenda, usuariosGerentes,
    usuariosCoordenadoresDeExibicao,
    usuariosCoordenadoresDeAdministracaoDeVendas);
    if (renderPainelInclusao) {
    if (pontoDeVendaFacade.inserirPontoDeVenda(pontoDeVenda) > 0) {
    adicionarMensagemDeConfirmacao(WebResourcesKeys.MSG_KEY_PONTO_DE_VENDA_INCLUIDO, pontoDeVenda.getMnemonico(), pontoDeVenda.getNome());
    } else if (renderPainelAlteracao) {
    if (pontoDeVendaFacade.atualizarPontoDeVenda(pontoDeVenda) > 0) {
    adicionarMensagemDeConfirmacao(WebResourcesKeys.MSG_KEY_PONTO_DE_VENDA_ALTERADO, pontoDeVenda.getMnemonico(), pontoDeVenda.getNome());
    return WebResourcesKeys.OUTCOME_PONTO_DE_VENDA_CONSULTAR;
    } catch (BusinessException be) {
    logger.error(be.getMessage(), be);
    handleBusinessException(be);
    } catch (Exception e) {
    logger.error(e.getMessage(), e);
    handleException(e);
    return null;
    protected void adicionarMensagemDeConfirmacao(String key, Object... args) {
    FacesMessage facesMessage = FacesMessageUtils.getConfirmationMessage(null, getKeyValue(key, args));
    FacesContext.getCurrentInstance().addMessage(null, facesMessage);
    }

    Not sure of wait but here is what you can do as alternative:
    On ActionListener of your button.. add a bean method to launch popup with dialog having confirmation message.
    Override DialogListener for dialog .. and do redirect
    refer:
    How to invoke task flow navigation after closing inline popup?
    Amit

  • After my windows 7 computer did automatic updates, everytime I click on a link I get a not responding message and have to wait almost a minute for the program to continue.

    Last night, my computer running Windows 7 premium home edition downloaded some automatic updates. I came in this morning to find that it had done a restart after adding these updates.
    Now, anytime I click a link or do something which requires a redirect to another web page, my program gives me the not responding message and I have to wait 30-55 seconds for the program to continue.
    I have Firefox 4 and it was running smoothly up until this morning, so I can only assume that whatever the automatic updates were, there is something in them that is causing this error. I do not know what updates were installed.

    I don't have that problem in Firefox 29 when I read Gmail or AOL (aim''.''com) webmail. When I click on a webpage link in an email I'm reading (example: http://www.tworivertheater.org/ ) the link opens in a separate Firefox tab.
    Are you saying this doesn't happen in outlook''.''com webmail and the link opens in the same Firefox tab as the email itself? I don't use outlook''.''com webmail myself. Hopefully someone will be along who does, or see [[Problems with email and how to find help]].
    It might help if you would confirm the type of link that is opening in the same tab as the email you are reading in your outlook webmail. If I misunderstood your problem, please explain it better.
    It might also help if you could furhish more troubleshooting information. Please do the following:
    *'''For Firefox 29.0 and above''': Click the menu button [[Image:New Fx Menu]], click help [[Image:Help-29]] and select ''Troubleshooting Information''.
    Now, a new tab containing your troubleshooting information should open.
    *At the top of the page, you should see a button that says "Copy text to clipboard". Click it.
    *Now, go back to your forum post and click inside the reply box. Press Ctrl+V to paste all the information you copied into the forum post.
    If you need further information about the Troubleshooting information page, please read the article [[Use the Troubleshooting Information page to help fix Firefox issues]].

  • Open popup window and redirect user to home page in sandboxed solution

    i've created a sandboxed solution visual webpart and it has submit button so when user fills the information in the text boxes availble in webpart and clicks submit button so I want to open popup button containg success message and ok button so when user
    clicks ok button in popup window i want user to be redirected to the home page of the site.
    i tried to open popup and showed success message by below code
     string gotohomepage = "http://sp2013:1111/Pages/home.aspx";
                    ScriptManager.RegisterStartupScript(this, this.GetType(), "message", "alert('Your Record has been submitted successfully,you will be redirected to home Page shortly');location.href =
    '" + gotohomepage + "';", true);
    but it's not opening popup window can anyone help how do i open popup window and redirect user to home page in sandboxed solution

    Page class and script manager are not supported in sandbox solution
    You can create model popup to achieve this
    below are the reference links
    http://blogs.msdn.com/b/chaks/archive/2011/09/14/modal-dialog-box-in-sharepoint-sandbox.aspx
    http://social.msdn.microsoft.com/Forums/en-US/9427db4d-60f2-4b2a-8db6-b50d01ac4f23/how-to-create-modal-popup-using-sandboxed-solution

  • I am trying to import developed images from LightRoom 5 in o Photoshop 6.  I am receiving this message and the images will not open.....'Could not open scratch file because the file is locked, you do not have necessary access permissions or another progra

    I am trying to import developed images from LightRoom 5 Photoshop 6 for further editing.  I am receiving this message and the images will not open.....'Could not open scratch file because the file is locked, or you do not have necessary access permissions or another program is using the file.  Use the 'Properties' command in the Windows Explorer to unlock the file. How do I fix this?  I would greatly appreciate it if you would respond with terms and procedures that a computer ignorant user, such as me, will understand.   Thanks.

    Have you tried restoring the Preferences yet?

  • The hard disc of my laptop has crashed and i lost all the data. Now I want to take back up of my I phone and transfer contacts , messages and music back into my laptop , how can I do that. Pl help

    The hard disc of my laptop has crashed and i lost all the data. Now I want to take back up of my I phone and transfer contacts , messages and music etc back into my laptop , how can I do that. Also let me know how I can transfer the contacts into Windows contacts from I phone. Pl help

    Your content will only be where you put it.  It has always been very basic to always maintain a backup copy of your computer.
    You can transfer itunes purchases from your iphone: File>Device>Transfer purchases.
    You can import your pics taken with the iphone as you would with any digital camera.
    You can e-mail the other pics to yourself, they will never be of the original quality.
    You can out a unique contact and calendar entry on the computer.  You should get the option to merge the data when you sync.

  • My daughter has just changed her phone from an iphone to a nokia but when i send her a message it still comes up as an i message and she doesnt receive it?

    my daughter has changed her phone from an iphone to a nokia but kept the same number but when i send her a message from my iphone it still comes up as an i messsage and she doesnt receive it can anybody tell me how to fix this please

    She needs to remove that device from the iMessage database, or if she still has the phone, she can go into Settings, Messages and turn off iMessage. If she still has the phone, she just needs to put the SIM back in for a couple of minutes to turn that off.
    If she does not have the phone any more, she will need to go to her Support Profile, if she registered the phone and delete the phone from the profile.

  • What is difference between I-mesage and Text Message, some I want to send I message and but I send text and it's charge to me

    What is difference between I-mesage and Text Message, some timeI want to send I-message and but I send text and it's charge to me.

    Thanks Wj,
    another question, how I got to know, my I-message is activated, I put as ON, but I am not getting mesage it's activated, there is link showing to me, learn more abount I-message. do it will take time? please advise how I can activate my I-message. Please advise.

  • I have just bought an iPhone 5 and it won't sync to iTunes.  It says it needs  iTunes 10.7, which I have downloaded and installed.  I still get the error message and looking at "about iTunes" it says 10.6.3.  What do I do??

    I have just bought an iPhone 5 and it won't sync to iTunes.  It says it needs  iTunes 10.7, which I have downloaded and installed.  I still get the error message and looking at "about iTunes" it says 10.6.3.  What do I do??

    Perhaps check to see if you're accidentally running two different versions of iTunes. There's some information on troubleshooting that in the Opening iTunes section of the following document:
    Troubleshooting iTunes installation on Mac OS X

  • TS2755 My husband and I have a linked apple account and i cloud. Now he is receiving all of my text messages. How can I fix it to where he only receives his messages and not mine? Any help is appreciated!

    My husband and I both have iphones and both are linked to the app store and i cloud. Now my husband is receiving all of my text messages and has all my contacts. How can we get it to where he does not receive my messages anymore? Any help is appreciated!

    Best way is to get your own Apple ID, but until then have him go to Settings > Message > Receive at and remove your phone number.

Maybe you are looking for

  • Error in applying the patch to OBIEE 11.1.1.6.8

    When I try to apply the opatch apply command,   below is the error I am getting. I am not able to find the resolution for this. I am not understanding the problem  by looking at this. optach failed with error code 1 C:\Middleware\Oracle_BI1\16094198>

  • "Previous Period" Calculation

    I'm building a 12 monthl trend reports in Deski and need to call a previous period value (which i halve already retrieved in the query) into a current period calculation. The example would be "Installation Revenue divided by Previous Period Installat

  • How to start working with BPEL[SOLVED]-but someone still can help me :)

    Hello Everyone, I'm Fizzz, I'm totally new to BPEL. I don't know where to start and how to start. Right now I'm Working with JDeveloper 11g R1. I didn't go further yet but Now i have to create some BPEL Process that can be integrated to my Web Applic

  • Generating user defined Graph nodes

    Can anyone tell me how I can generate a user defined number of Graph.Nodes from the keyboard instead of going through them one at a time please. I have tried to use a for loop but I can't get it to work. Can anyone help. import java.util.Iterator; pu

  • Photoshop cc generate assets doesn't resize all images correctly

    I have a stack of images, and I'm using Photoshop CC's new generate assets to produce two versions of each. One at current size (retina), one at half size (normal). Each layer I'm exporting has this naming format "[email protected], 50%image1.jpg". W