Preserving facesmessages after redirect

Hi ,
I need to render a facesmessages after the redirection. And i also have to end the conversation before redirect. In pages.xml I have the following code:
<navigation from-action="#{abc.edit}">
<end-conversation before-redirect="true" />
<redirect view-id="/abcList.xhtml">
     <message>successfully edited.</message>
</redirect>
</navigation>
I need to display this message after the control is redirected to abc.xhtml. What i need to do here

The messages are stored in the request scope. So, the clearing is expected.
Look at http://jsffaq.com/Wiki.jsp?page=HowToShowFacesMessageOnTheNextPage
for some clues how to solve the problem.
Sergey : http://jsfTutorials.net

Similar Messages

  • Print statement in JSP page after redirection

    Hi,
    I have written a JSP page and in that i am redirecting it to another page. Now after redirection i am printing a statement on the console. It is getting printed whereas when i am printing the same on the browser i am not able to print that. Please can any one tell me the difference between printing the same on the console and browser.
    My first JSP page(one.jsp)
    <%
         response.sendRedirect("two.jsp");
         out.println("After redirect");
         System.out.println("After out");
    %>
    My second JSP(two.jsp)
    <%
         out.println("In two.jsp");
    %>
    Thanks in advance
    regards
    Prashanth

    The sendRedirect sets a code in the HTTP response being sent to the client (I believe it is a 302 code but I am not sure off hand) and then proceeds to process the rest of the JSP on the server which is why the print statement shows up in the console.
    The out.println writes to the HTTP response output stream. The client gets the response and sees the HTTP Header code telling it to make a new request so it stops processing the response message and sends a new request message which is why the out.println message is not seen in the browser.

  • Session not closing after redirecting from BSP View

    Hi All,
    I am trying to redirect to a new application (WD ABAP) from an existing BSP View by using
    CALL METHOD runtime->server->response->redirect( url = lv_url1 ).
    The session still exists in SM04 after redirecting but I want the BSP session be closed.
    Any pointers to how this can be done??
    "navigation" global object is not recognized in the View it seems because I was thinking of using
    navigation->exit (url).
    navigation->response_complete().
    but it gave complie errors.
    Awaiting your suggestions..
    Thanks and Regards
    Avinash

    Please have a look at the BSP application SYSTEM => page => sessionexit.htm

  • Losing beans after redirecting in jsp

    hi , everybody
    I am new in web programming.
    this is my jsp :
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>Insert title here</title>
    </head>
    <body>
    <%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
    <bean:write name="mess" property="text"/><br>
    your username: <bean:write name="user" property="name"/><br>
    your password: <bean:write name="user" property="password"/><br>
    To add the book to Database click <a href="/pages/BookAdding.jsp">here</a><br>
    To rent the book click <a href="pages/RentBook.jsp">here</a>
    </body>
    </html>
    <as you can see here i have 2 javabeans 1-mess 2-user
    and 2 possibilities for redirection (<a href....>)
    after redirection my beans are null....
    somebody can help me please???
    thanks

    First of all, the taglib declaration should be on the top of you jsp.
    <%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>Insert title here</title>
    </head>
    <body>
    <bean:write name="mess" property="text"/><br>
    your username: <bean:write name="user" property="name"/><br>
    your password: <bean:write name="user" property="password"/><br>
    To add the book to Database click <a href="/pages/BookAdding.jsp">here</a><br>
    To rent the book click <a href="pages/RentBook.jsp">here</a>
    </body>
    </html>The beans are lost because they have either a page or a request scope.
    To avoid this, put them in the session scope instead.
    A very good tutorial here http://courses.coreservlets.com/Course-Materials/csajsp2.html
    See The JSP 2.0 Expression Language: Simplifying MVC and Access to Java Code part.
    Hope it helps

  • LOV Values Are Not Preserved After Redirect

    Hello,
    I have a page where I have two LOV's on top of the page and interactive report is generated based on the values from LOV's.
    The values are passed to IR report correctly. MY problem is when I change values in LOV 2, LOV 1 values are getting reset.
    Both LOV's Display As is set as Select List with RedirectHow can I make sure that LOV values are preserved even if I change values in either any one of the LOV?
    I am using APEX 3.2
    Thanks and regards
    Edited by: ponic on Jun 22, 2011 7:54 AM

    Thanks for the suggestion.
    I have found another way to resolve my problem.
    http://djbramer.blogs.plymouth.edu/2006/08/14/apex-parent-child-select-lists-and-onchange-submitting/
    By following the above I could preserve values in my LOV's
    Regards

  • Time out error after redirection (ADFS-Office 365 SSO)

    Hi everyone,
     I've been having a problem with configuring ADFS and Office 365 SSO. So Everything is setup and signing into office 365 from the internal network works perfectly but when trying to access from the external network I get timed out. A brief overview
    of my setup:
    LAN------>Firewall---------->Firewall------>Internet
                       |
                     DMZ
    LAN network: 192.168.50.0/24
    DC-DNS, RODC-DNS, ADFS1-ADFS2 (NLB), DIRSYNC.
    DMZ: 172.16.50.0/24
    ADFS Proxy1-ADFS Proxy 2 (NLB) (NLB IP: 172.16.50.225)
    Firewall-Firewall: 10.10.10.0/24
    Internal Firewall: Inside: 192.168.50.254/Outside: 10.10.10.2
    External Firewall: Inside: 10.10.10.1/Outside: 172.31.130.83 (working in a class lab with my universities private network)
    Our network engineering department has its own firewall, I was given a Public IP address of 199.50.X.X that port forwards both port 80 and 443 to the outside interface of the external firewall (172.31.130.83)
    The internal firewall allows outgoing and incoming connections from anywhere for troubleshooting the issue. The External Firewall has been configured portforward both port 80 and 443 to the adfs proxy NLB address.
    Other firewall configurations such as NAT and static routes have been configured correctly.
    I've updated the public DNS records, the A record for my ADFS from the public IP address godaddy assigned to my public domain to the public IP given to me (199.50.X.X). I added the adfs server internal IP and name to the adfs proxy host files and DNS resolution
    is working both internal and externally.
    Using a domain-joined computer and user I am able to sign into office 365 with no problems. The problem starts when I try to access from an external device. When entering a domain user email at the office portal, it tries to redirect me to my adfs proxy
    but after a minute or so it fails to load my internal adfs login page and using google chrome I see a timeout error.
    Checked event viewer on both adfs and adfs proxy servers and nothing is showing up, checked my firewalls and everything seems to be working fine, I also confirmed that the faculty's firewall is receiving and forwarding correctly through ports 443 and 80
    (my external firewall also shows the same results).
    Any help would appreciated, been troubleshooting for more than  week and pretty much out of options other than starting over.
    Thank you.
    Moe.

    Hi Moe,
    Regarding specific ADFS query, I suggest you refer to experts from the following forum to get professional support:
    Claims based access platform (CBA), code-named Geneva Forum
    http://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=Geneva
    Thank you for your understanding and support.
    Best Regards,
    Amy
    Please remember to mark the replies as answers if they help and un-mark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected]

  • How to have web page open in same browser window after redirect in Flash video placed in Dreamweaver?

    Hello,
    Would be grateful if anyone can help me.
    website: www.Paris-Pet.com
    Currently, a flash video plays on the index page. The following action is placed in the last frame of the video in Flash:
    navigateToURL(new URLRequest("http://www.paris-pet.com/home.html"));
    This is working as intended with one exception: Instead of directing to the home page from the index page when the video is completed, it opens up the home page in a second browser window, leaving the empty browser window of the flash movie. This is not the seamless design I was hoping for, and I've also been told on some computers, blocking pop up windows is preventing them from smoothly transitioning to the rest of the web site.
    I would like the redirect to open the home page in the same browser window as the movie in the index page played.
    Please help. Print designer in over her head.
    JM

    Brilliant, Jon. Thank you so much. For those of you who stumble on this, I did have a tiny bit of trouble when I edited the actionscript; the video didn't play as expected. After trial and error, this is the code that worked both in playing the video and opening up in the same browser window:
    navigateToURL(new URLRequest("http://www.paris-pet.com/home.html"),"_self");
    The difference seems to be this:  ")     before the comma prior to "_self");
    Again, Jon -- thanks!
    Jack

  • Disabled button after redirect

    I have created a page with a region button on it. The button has a redirect to a URL which runs a pl/sql procedure.
    After clicking the button, the procedure runs and I see my original page, but, the button is disabled.
    When I look at the page source, I see that the button has the attribute:
    onClick="javascript: this.disabled=true;"
    How can I keep the button from being disabled?
    Thanks for this wonderful forum.
    Cy

    Thanks for the reply,
    I actually tried that first. The problem is that I need the procedure to download a custom CSV file. It works with a redirect to a url. I could not make it work from a page process. There are several threads and a how-to about downloading a csv file. Nothing helped me get it to work from a page process.
    My whole application revolves around the user selecting some items from a report and clicking a button to get a custom csv built and downloaded. The csv has too many columns to be a report download and the columns may be too wide.
    Thanks again,
    Cy

  • Error Messages after redirect

    Hey all,
    I am trying to use the the addMessage of the faces context to display some error messages that happen during my business logic exec. phase, but i can't seem to get it to work.
    Heres the scenario.
    I have a page that lists all the users in my app, and another that allows to add/edit/delete a user.
    I got the addMessage to work when add/edit/delete errors occur where the user will return tto the add/edit/delete page and a message is displayed.
    But now when those actions succeed i want to user to go back to the users listing page and display a message like.. user added succfully or somthing.
    how could I do that... is it possible using addMessage, ???

    Hello,
    You can use following phase listener to achieve what you want. Just place phase listener definition in your faces-config.xml. Many thanks to Jesse Wilson for original idea.
         <lifecycle>
              <phase-listener>yourpackage.MessageHandler</phase-listener>
         </lifecycle>
    MessageHandler.java:
    package yourpackage;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.util.Iterator;
    import javax.faces.event.PhaseListener;
    import javax.faces.event.PhaseId;
    import javax.faces.event.PhaseEvent;
    import javax.faces.context.FacesContext;
    import javax.faces.application.FacesMessage;
    * Enables messages to be rendered on different pages from which they were set.
    * To produce this behaviour, this class acts as a <code>PhaseListener</code>.
    * This is performed by moving the FacesMessage objects:
    * <li>After each phase where messages may be added, this moves the messages from
    * the page-scoped FacesContext to the session-scoped session map.
    * <li>Before messages are rendered, this moves the messages from the session-scoped
    * session map back to the page-scoped FacesContext.
    * Only messages that are not associated with a particular component are ever
    * moved. These are the only messages that can be rendered on a page that is different
    * from where they originated.
    * To enable this behaviour, add a <code>lifecycle</code> block to your
    * faces-config.xml file. That block should contain a single <code>phase-listener</code>
    * block containing the fully-qualified classname of this file.
    * @author Jesse Wilson
    public class MessageHandler implements PhaseListener {
         * a name to save messages in the session under
         private static final String sessionToken = "MULTI_PAGE_MESSAGES_SUPPORT";
         * Return the identifier of the request processing phase during which this
         * listener is interested in processing PhaseEvent events.
         public PhaseId getPhaseId() {
              return PhaseId.ANY_PHASE;
         * Handle a notification that the processing for a particular phase of the
         * request processing lifecycle is about to begin.
         public void beforePhase(PhaseEvent event) {
              if(event.getPhaseId() == PhaseId.RENDER_RESPONSE) {
                   FacesContext facesContext = event.getFacesContext();
                   restoreMessages(facesContext);
         * Handle a notification that the processing for a particular phase has just
         * been completed.
         public void afterPhase(PhaseEvent event) {
              if(event.getPhaseId() == PhaseId.APPLY_REQUEST_VALUES ||
              event.getPhaseId() == PhaseId.PROCESS_VALIDATIONS ||
              event.getPhaseId() == PhaseId.INVOKE_APPLICATION) {
                   FacesContext facesContext = event.getFacesContext();
                   saveMessages(facesContext);
         * Remove the messages that are not associated with any particular component
         * from the faces context and store them to the user's session.
         * @return the number of removed messages.
         private int saveMessages(FacesContext facesContext) {
              // remove messages from the context
              List messages = new ArrayList();
              for(Iterator i = facesContext.getMessages(null); i.hasNext(); ) {
                   messages.add(i.next());
                   i.remove();
              // store them in the session
              if(messages.size() == 0) {
                   return 0;
              Map sessionMap = facesContext.getExternalContext().getSessionMap();
              // if there already are messages
              List existingMessages = (List)sessionMap.get(sessionToken);
              if(existingMessages != null) {
                   existingMessages.addAll(messages);
              else {
                   sessionMap.put(sessionToken, messages); // if these are the first messages
              return messages.size();
         * Remove the messages that are not associated with any particular component
         * from the user's session and add them to the faces context.
         * @return the number of removed messages.
         private int restoreMessages(FacesContext facesContext) {
              // remove messages from the session
              Map sessionMap = facesContext.getExternalContext().getSessionMap();
              List messages = (List)sessionMap.remove(sessionToken);
              // store them in the context
              if(messages == null) {
                   return 0;
              int restoredCount = messages.size();
              for(Iterator i = messages.iterator(); i.hasNext(); ) {
                   facesContext.addMessage(null, (FacesMessage)i.next());
              return restoredCount;
    }

  • Cannot conect to Job server after redirecting log files

    Platform: Windows
    Software: Data Services 3.0 (Data Integrator 12.0.0)
    Issue: When redirecting the Log files to go to another drive on the windows Server, we are unable to reconnect to the Job Server with Designer.
    We did the following to re-direct the Log files:
    In the DSConfig.txt file on the machine where the jobserver runs, they will find a section similar to the following:
    [AL_JobServer]
    AL_JobServerPath=C:\PROGRA1\BUSINE1\DATAIN~1.7\bin\al_jobserver.exe
    AL_JobServerLoadBalanceDebug=FALSE
    AL_JobServerLoadOSPolling=60
    AL_JobServerSendNotificationTimeout=60
    AL_JobServerLoadRBThreshold=10
    AL_JobServerLoadAlwaysRoundRobin=FALSE
    AL_JobServerAdditionalJobCommandLine=
    ServiceDisplayName=Data Integrator Service
    AL_JobServerName1=WestJS
    AL_JobServerPort1=3500
    AL_JobServerRepoPrefix1=
    AL_JobServerLogDirectory1=
    AL_JobServerBrokerPort1=
    AL_JobServerAdapterManager1=
    AL_JobServerEnableSNMP1=
    AL_JobServerName2=EastJS
    AL_JobServerPort2=3501
    AL_JobServerRepoPrefix2=
    AL_JobServerLogDirectory2=
    AL_JobServerBrokerPort2=
    AL_JobServerAdapterManager2=
    AL_JobServerEnableSNMP2=
    (As with any DSConfig.txt edits, I always tell customers to be very careful, to only follow instructions they receive from customer assurance, and to make backups of the prior file in case they need to revert.)
    Note that there is a u201CWestu201D jobserver defined with the 1 suffix, and an u201CEastu201D jobserver defined with the 2 suffix.  Both jobservers will by default log into %LINK_DIR%\log\ into a directory named after their jobserver name.  If the customer wants to redirect the logs for the u201CWestu201D jobserver to a different path, add the following to this section:
    AL_JobServerLogReDir1=D:\dierrorlogs\Log
    Note the use of the suffix 1 u2013 it means that it will be a part of the settings for the u201CWestu201D jobserver.  The u201CEastu201D jobserver will still log to %LINK_DIR%\log\EastJS while the u201CWestu201D jobserver will log to D:\dierrorlogs\Log.
    All we did was add the one single line AL_JobServerLogReDir1="E:\Program Files\BusinessObjects\dierrorlogs\Log"
    Can anyone give us some sort of suggestion or idea as to why we lost our connection to our Job Server with this change?  We DID restart the service.
    Thanks!  Ken

    I am not sure if this Parameter actually works ? I have to check that
    can you see the JobServer process in the task manager ? check the windows event log for any errors for the JobServe
    since you modified the path, I don't think it will be generating any log file for Job server
    what's the status for the job server in Desginer and Management console ?

  • Preserving iterators after rollback

    Hi,
    Is there a way to preserve the position in the table after a rollback?
    I have tried to remember the Key and to reinitialize the iterator in the overridden afteRollback function, but it doesn't work. There must be something in the framework what is executed after the afterRollback function what resets the iterators.
    Andrija

    I have a Frame extending a JFrame and on this Frame I have 2 comboboxes (JComboBox), a table (JTable) and a navigation bar (JUNavigationBar) for this table.
    Those controls are bounded to views from the Application module in my BC4J project.
    The views (all three of them) are organized in the Application module as master-detail, i.e.
    combo1 (view1) is master of combo2 (view2) and combo2 is master of the table (view3).
    scenario:
    If I select an entry from combo1, respectively (because of the master detail relationship) the available entries in combo2 and the table changes. Now, if I select a different entry from combo2 the contents of the table changes of course.
    Lets say I navigate through the table to a certain record and edit it, but I decide to drop the changes so I click on rollback button of the navigation bar ...
    what happens is that everything gets reset ... combo1 gets the initial value and since it's a master, contents of combo2 and the table are reset to.
    How can I prevent it from happening and keep the current position?
    It shouldn't be a rocket science. Someone must have already have hit the same problem.
    thanks
    Andrija

  • Code after redirect (or forward)

    Suppose that I redirect from a servlet to a jsp and I want that some code of the servlet is executed after the jsp presentation, how can I do this?
    response.sendRedirect("/jsp/onejsp.jsp");
    code_to_execute_after_jsp_presentation();
    The problem is that the jsp is called after all the code of the servlet is executed.
    There is a solution to this problem?
    Thanks
    Luciano

    Hi,
    I saw several of your messages that talk about "sendRedirect". I have the same problem. I have 2 JSP pages, but they are in two different location (JVM). I would like to send some session Attributes (using session.setAttribute from source JSP) to the target JSP. Therefore it can be read as session attribute also it will not show user what is the Parameter and details (if you send Parameter using "?CustomerID=<%= CustomerID %>" then user can see the info by viewing the source).
    If you know the answer already, can you let me know?

  • Does control comes back to servlet after redirecting to a jsp page.

    Hi
    I have a query on request dispatcher.
    I have redirected control to a jsp page in my java class as below.
    HttpServletRequest request=null;
         HttpServletResponse response=null;
         RequestDispatcher requestDispatcher = request.getRequestDispatcher("a.jsp");
         try {
              requestDispatcher.forward(request,response);
         } catch (ServletException e) {
              System.out.println("success");
              e.printStackTrace();
         } catch (IOException e) {
              System.out.println("success 1");
              e.printStackTrace();
         finally
              System.out.println("success 2");
         System.out.println("success 3");
         Jsp page is successfully diaplayed in browser.
    but when i see my console window in eclopse IDE...
    I does not diaply Success 2 / Success 3....
    Please help me..
    thanks

    This is an eclipse/server question... not really a java question.
    I have NO IDEA how eclipse interplays with you're (unspecified) server.
    I can tell you that typically the standard output and error streams of the J2EE server are redirected by the server startup script to a file in the deployed applications root directory... So have a look around.
    Edited by: corlettk on 16/05/2008 04:49 - Oops.

  • Confirm OK/Cancel: could not stop processing after redirect

    I am have a problem doing a JavaScript confirmation which in a cfinclude file in the process page.
    When the display page send content to the process page, and process page first do some validation which is included in a cfinclude file. The issue is user need to choose from a confirmation message box, choose OK to continue processing, Cancel to send user to previous display page. Every thing seems working, except when user choose Cancel and is sent to the previous page, the execution on the process page continues anyway, behind scene though. Without server process validation you may not realize it. but the truth is it does not stop when user choose Cancel.
    So I need your insights how to handle the situation: give user choice to choose but when user select Cancel, stop the execution of the code after cfinclude.
    Is there anyway to do the message box without JavaScript? If only it could be done in Coldfusion, then the problem solve, by setting a coldfusion variable to stop the execution.
    Please help!
    Thanks
    Jush

    Keep in mind that cf runs on the server, js runs on the client, and the two don't know what the other is doing.  You have a couple of choices.
    1.  Put the validation on the initial page so that selecting cancel keeps them on that page.
    2. Have a page that does validation and nothing else.  Have the rest of the code on another page.  Use js to send the user to the proper page depending on what they select with the confirm dialogue.

  • How do I reset Business Catalyst log-on after redirecting website to Google Sites?

    I am trying to log into my Business Catalyst account after moving my website to google sites - the BC login tries to go to the new website instead of logging into a business Catalyst dashboard.
    All I want to do is to make sure the Business Catalyst account is closed and files are deleted - but can't get to it.

    Is the user logging out or is the internet disconnecting after 15 minutes?
    If the user is logging out go to System Preferences > Security and there is an option to log-out after a specified time period inactive, uncheck that box.

Maybe you are looking for

  • How to install Open Office 3 on Leopard 10.5.5

    Hello everyone, I just bought a new MacBook (the 13" version) and I'm new to all this Mac stuff, you know the Mac OS and everything. I'm trying to add some of the programs I usually use in my other two systems (Windows Server 2008 and Linux) and one

  • Rootpre.sh with Oracle 11G Installation  on AIX 6.1

    We are upgrading to Oracle 11G from Oracle 10.2.0.4 on AIX 6.1 and ECC6. We are running Oracle 10G and SAP application while installing 11G Oracle binaries (obviously in a new oracle 11G home) , while installing Oracle 11G binaries we have to run roo

  • Can't select WEP security setting.

    Hi, I just set up a DPC3825 router, and I wanted to use WEP security settings so my DS Lite can connect to the internet, but it appear the only options in the Wireless > Wireless Security dropdown list are : WPA-Personal WPA2-Personal WPA or WPA2-Pe

  • Coldfusion cfwindow

    Hi, I am currently working in Coldfusion 9.There is a requirement to build cfwindow. But I am not able to change the border color of this cfwindow. I was able to change the header style. But not the border color. Another thing is even I have used cen

  • Corresponding R/3 table.

    Hi All, I have a R/3 Quantity field thats populating another quantity field in BW. I think its getting the wrong numbers. How can go back to R/3 to check if the numbers match. I have the technical name of the R/3 field but not sure in which table its