Problem doing a reDirect

My application has a Login page which then brings me to my homepage home.jsp
On this page I fill out fields which populates my backing bean and then with some Action I get forwarded to b.jsp
I do other stuff here and everything's fine until ...... I let the app time out and then do some button action on b.jsp.
I get sent to the login page, login and then the browser when attempting to load b.jsp ( My original location ) I get several "Could not get property ...... " servletExceptions. When I debug the bean ( which is session scope ) I see that it has lots of fields which are null because they all get populated in home.jsp but the application is trying to load b.jsp
I thought this could be fixed with a navigation rule but as I'm going to b.jsp straight from login.html no rules will get run.
I put a redirect in the bean to redirect if it detects any of the values it requires are null but this does not work. I get the same "Could not get property ...... " servletException
     private boolean checkForRedirect()
          FacesContext context = FacesContext.getCurrentInstance();
          HttpServletResponse response =     (HttpServletResponse)context.getExternalContext().getResponse();
          try
                    if( ( field1== null ) || ( field2==null ) )
                         response. sendRedirect("home.jsp");
                         return false;
          catch (IOException e)
               e.printStackTrace();//To change body of catch statement use File | Settings | File Templates.
          return true;
     }

Hi JFrain2004,
I was interested in the result of this, so I gave it a test as I have a page that can get an error as described.
So my result..
First, somewhere near the top of the b.jsp page (or xhtml page in my case) put the equivilant of the following (This code must certainly go before any other components):
<h:panelGroup rendered="#{userSession.findPacketContext == null}">
     <script type='text/javascript'>window.location = 'http://www.google.com/'</script>
</h:panelGroup>Change userSession the bean you are using and try and get an important variable from it (one that if you don't have will cause the page to blow up). In my case I need the findPacketContext. Without it the code will blow up. Now the assumption is that if I have been to page "a" first, then findPacketContext is not null, so do check in the h:panelGroup for when it is null. The javascript will be printed when the result is null and will send the page to what ever page you wish, eg. "a.jsp".
Thanks
Victoria

Similar Messages

  • Does SCAN redirect to node-IP or node-VIP?

    I have a 2 node 11gR2 RAC cluster with both SCAN and node VIPs configured. Users connect to the SCAN address. The SCAN listener then redirects connections to the node listener. Does it redirect to the node listener via the node's address or the node's VIP address?
    Here's why I'm asking. I'm trying to troubleshoot a recurring problem where node2's VIPs (scan and node-vip) keep failing over to node1 every few weeks. CRS logs on node1 say that it thinks (incorrectly) that node2 is inaccesible so it failed over both VIPs (scan and node-vip). Within a minute or so however, node1 can see node2 again without anyone intervening.
    Node2 however remains up the entire time and is running normally. Neither the node listener, database instance, or ASM instance show any indication of a problem in their logs.
    On node2's database instance however, all sessions have dropped even though the instance remained up. If the SCAN listeners redirect directly to node2, I would not expect this to happen and I can pin the problem down to some network component (switch, NIC, etc). If SCAN redirects to the node-VIP then I would expect this and need to troubleshoot why node1 is incorrectly thinking node2 went down.

    Chuck1958 wrote:
    Users connect to the SCAN address. The SCAN listener then redirects connections to the node listener. Does it redirect to the node listener via the node's address or the node's VIP address?That depends on
    a) the service the user requests to be connected to
    b) the registered hostnames of that service in the Listener
    The SCAN listener is a remote listener, with which local listeners, register. The SCAN listener hands off/redirects connections based on what has been registered with it.
    Also, a redirect is done using hostname and not dotted IP. Which means in exceptional circumstances, the client can use a hosts file with all static and virtual hostnames, referring to the same single (static or virtual) IP address.
    Irrespective of what the SCAN Listener provides as hostname for the redirect, will in such a case be resolved, by the client, to the same IP address. Useful when troubleshooting, or when dealing with NAT firewalls.

  • PORTAL.Home does not redirect to chosen page.

    Hello All
    I have recently successfully transported my oracle development to another server and unfortunately am left with one rather minor but important problem.
    i have a public page with an SSO portlet on it for a user to login to, however when i goto administer and change the default page, a user is still referred to the default Top-level site if no session is opened. and clicking home still does not redirect. I was wondering if anyone could tell me the table where the URL for PORTAL.home is kept so I could edit it manually as it seems the webform is not working. or is it possible to safely deny/delete the builder design time pages completely for client side deployment?
    Many Thanks
    James

    Sorry forgot to state i am working on portal 10.1.4 with DB on 10.1.0.5.

  • HT5429 How long after you report a problem does it take for the fix to be picked up in maps?

    How long after you report a problem does it take for the fix to be picked up in maps? The street I live on is misspelled. It's shown as one word, but it should be two words. Maps cannot find the address when it is spelled correctly, so I have it purposely misspelled it as one word in my contacts, which helps for the most part, however it still tries to place my home on an entirely different street all together. Fortunately this new random street is at least close to where I live. When I used to spell my street correctly with two words, maps would try to send me to the next town over. So it kind of works, as long as I misspell my street, and ignore the fact that it is showing where I live to be a couple of streets down from where I actually live. I live in Connecticut - not in the most populated of areas, but not in the middle of nowhere either. Amazingly enough Google Maps will correctly find my address whether it's spelled with one words or two words. Google Maps also shows my apartment complex, which Apple Maps does not. I really wish Apple would just do a quick pass of the area to fix these issues. I’ve reported the problem several times, months ago. How long will it take for there to be a fix? I keep trying to use the Apple ecosystem, but Google is clearly the better solution for me.

    Apple does not do the GIS data for maps. That comes from 3rd party vendors like Tom Tom. I have read it takes some time to update map data. The only thing you can do is report it.
    Not to belittle your complaint, but on my end it is Apple that is clearly better. When looking at my house in Google, the satellite photo is more than 4 years old, and the Apple one is much newer. I can tell because of the condition of my home and the neighbor's. They had an above ground pool which was removed 4 years ago and it shows on the Google Map. I had remodeling and roof work done to my home that started 3 years ago and Apple's satellite view showed this work done, which took over a year to complete. I live in the middle of a block in a rural town. Both Apple and Google split the block into 100 parts and put my home close to the beginning of the block instead of where it actually sits. I've reported it to both Google and Apple and no one has changed. Just one of those things. But, keep your chin up, it will get corrected eventually.

  • How does one update Flash? I currently cannot watch videos on You Tube, it says I need to upgrade, I have no problem doing this on a PC.

    How does one update Flash? I currently cannot watch videos on You Tube, it says I need to upgrade, I have no problem doing this on a PC.

    If you're not using chrome you can just go to adobe's website (http://get.adobe.com/flashplayer/) and download the newest flash player.  You run the .dmg and then open the application, which updates flash.  With the latest version of flash there should be a preference pane within system preferences to allow you to change settings and check for updates.

  • When I enable imatch on my iPhone 4s it takes approximately 30 minutes before other data fills 13.2gb of usable data. This problem does not occur when I manually sync music to my phone. Is this a common bug, and if so; is there a fix?

    When I enable imatch on my iPhone 4s it takes approximately 30 minutes before other data fills 13.2gb of usable data on the phone. This problem does not occur when I manually sync music to my phone only when I access imatch. Is this a common bug, and if so; is there a fix?

    yes it is. you can sign out of itunes account then sign back in. use http://support.apple.com/kb/ht1311 to sign out.

  • I have a 17" Macbook pro with flickering red and cyan(blue) lines across the screen. The issue disappears temporarily when I tap on the computer, and the problem does not occur when I use external display or try to screen capture the problem.

    I purchased my Macbook (17") through a certified apple tecnition in August 2012, it was refurbished and the motherboard was completely replaced. I do a lot of photo editing, but I have been unable to do so because of the red vibrating lines that interrupt my screen. The issue disappears temporarily when I tap on the computer, and the problem does not occur when I use external display or try to screen capture the problem. I brought the computer back to the technition I purchased it from and he said that it was a problem with my fan, so I have two new fans but the issue is still occuring. He says he doesnt know whats wrong. Does anyone have any information on this issue?
    Here is an image of the issue
    http://www.flickr.com/photos/67839707@N08/8884847081/

    I recommend having your Mac serviced by someone competent. A force sufficient to "blow apart" the fans was clearly excessive and may have damaged the display cable, as well as any number of other problems.
    Dust is properly cleaned with a vacuum, preferably one designed for computer service, and they are not cheap.
    Compressed air should never be used. It just blows dust everywhere, often into places where it can no longer be removed.

  • On my new iMac, mail has no sound after waking from sleep.  If I select do not wake for network access in general preferences, the problem does not occur.  Anyone have an idea on how to fix this?

    On my new iMac, mail has no sound after waking from sleep.  If I select do not wake for network access in general preferences, the problem does not occur.  Anyone have an idea on how to fix this? Thanks --

    Same here on an older iMac since Lion. Thanks for the uncheck wake for network access tip though, it doesn't do it either in that case, I will leave it that way.

  • Problem doing a chart

    hi!
    I have a problem doing a chart, I have three columns: I have dimension department in X Axis and I have two measure columns.
    I have a view selector with each measure so...I have two charts. My problem is that I have to apply a filter and I need to show only departments that has a value more than 0. How can I apply this filter?
    If I apply a filter in answers two charts has the same departments and isn't true because each measure has different departments...
    Can you help me??
    Thanks!!!

    Hello!
    I know this type of filter.
    In my fx formula I have this code:
    FILTER(IFNULL("- Actual".Value, 0) USING ("Dim Concept".Concept = 'Number of Ships'))
    Then I have another column (Department) and I have to do a chart.
    I want to see only departments that has my first column > 0, but I have to apply this filter inside of my column because I have another columns with another concept...
    I mean, If I choose on my view selector Measure 1 I can see for example: 10 departments on X AXIS of my chart and If I choose Measure 2 in my view selector...I should see for example only 7 because another has 0 value...
    Is possible to get this???
    Thanks!!

  • I just downloaded the new itunes update, now I can't copying TV shows purchased from the library to my backup computer, it says the files are invisible. Never had any problem doing it until the update.

    I just downloaded the new itunes update, now I can't copying TV shows purchased from the library to my backup computer, it says the files are invisible. Never had any problem doing it until the update. I have a Mac Pro G5 OS 10.6.8. The desktop hidden files app doesn't reveal the TV shows.

    found a solution in a different discussion.. thank god.

  • Problem doing SFTP through ISDN

    Hi,
    I have a problem doing SFTP through ISDN, ISDN connection is not staying active throughout the duration of the file transfer, it drops after its timeout value even if data transfer is in progress and file transfer break at that point, this happens with sftp transfer only, other type of connection like telnet, rdp works fine. Intresting traffic list I have define is,
    access-list 112 permit ip host 10.10.10.9 any. All the traffic is orignating from IP address 10.10.10.9
    Any suggestion on that.
    Thank you
    Yamin

    This is a fairly common issue with ISDN dialers. The disconnect may be initiated by either side of the connection.
    If you are certain that all is OK on your end, it may be the remote side that initiates the disconnect.
    regards,
    Leo

  • My mouse is unable to access the top toolbar in websites and email with Firefox - this problem does not present in Windows XP or Internet Explorer

    My mouse is unable to connect with the top toolbar of my hotmail account and any other websites I visit using Mozilla as a browser. This problem does not occur when I use Internet Explorer

    The answer was perfect! I fixed the problem following the link. When I posted the question yesterday, I was not very optomistic that anyone would reply and/or help - but, I was wrong. The solution was quick and simple.
    Thanks very much!!

  • How does one redirect installation to a different disc drive?

    How does one redirect installation to a different disc drive?

    Hi space needle,
    Thank you for posting on the Adobe forums, please help us with the information listed below for further assistance on this.
    1) which Application are you trying to install?
    2) Operating System you are working on
    3) Method of installation (customized or the standard installation)
    Thanks,
    Vikrantt Singh

  • Having problems doing an iCloud backup it keeps showing the estimated time thing but the blue load bar hasn't budged in over a half hour is there a way to correct this

    Having problems doing an iCloud backup it keeps showing the estimated time thing but the blue load bar hasn't budged in over a half hour is there a way to correct this

    You might try a forced shutdown to begin with, hold down the top and home buttons together until the device shuts down, then restart it.
    First check that your device is correctly connected to the wifi/internet (settings > wifi)
    If your back up continually fails, you might try turning off back up on your mobile device (settings > iCloud > storage & backup) and then deleting the backup file from iCloud by swiping the backup file on the mobile device (settings > iCloud > storage & backup > manage…) and then turning back up on again.
    If this doesn't help, try turning off some items for back up in a pattern to try to establish if your problem is being caused by specific data on your device.
    Being able to back up to the cloud can be very useful, especially if you don't have access to a computer or have infrequent access to one, however unless you specifically need to use iCloud for back up, you will find backing up to iTunes significantly more convenient and possibly more reliable.
    More about iCloud v iTunes Back Up

  • Form does NOT redirect to PayPal!

    Hello! Our form in the majority of cases does NOT redirect to PayPal. What we need to do?

    Hi,
    One thing that could help is to look at the info in the agent logs, first increase Debug Logging Level, then restart the agent server and click thru your app, then look in agent runtime logs which should have more descriptive errors. For more detail on how to do this, try http://wikis.sun.com/display/OpenSSO/GlassFishAgentTrouble#GlassFishAgentTrouble-generaltips
    You could look on this page, which is mostly based on GlassFish server but could help for other servers as well.
    http://wikis.sun.com/display/OpenSSO/GlassFishAgentTrouble
    I have not installed either of the policy agents you mentioned. But with some of the other agents, like the Sun App server 9 (GlassFish) agent, it comes with a sample application, and I find that this is the best way to ensure your setup is good and you are following all steps etc. Once sample app is up, you can try your own apps with confidence.
    Since you already have the SJSAS 9 installed, maybe you could create a new domain and download/install the SJSAS 9 policy agent on the new domain. Then try out the sample app?
    Or if those other agents have a sample app then try it out.
    hth,
    Sean

Maybe you are looking for

  • Instalment Payment terms

    Hi, May i know if it is possible payment terms with Decimal percentages like 42.67% Intial payment 32.98% second payment and so on. i know cash discount is possible with decimal percentages. But i would like to know if this also works Thanks in advan

  • Quicktime 10.4 on mac OSX 10.10.2 won't open quicktime 7.6.6 in a website

    I have been going to some websites recently trying to see some videos.  Instead of a thumbnail there is a puzzle piece and it says need to download Quicktime 7.6.6 or higher.  I can't view the video.  I am on a Mac desktop using OSX 10.10.2.  The web

  • Solaris Express Developer Edition, free DVD kit

    Today I ordered the "Free Solaris Express Developer Edition DVD": "For a limited time, Sun is offering a Solaris Express Developer Edition DVD for x86 platforms mailed to you at no charge." (http://developers.sun.com/sxde/download.jsp) Will I get the

  • Picking list determination

    hi, we're using WM which needs to print picking list for picking(TO), i would like to know how the picking list is determined, i mean the logic setup for picking list, where is the path for config in the system. i knew that if we are using by Tcode t

  • ESMTP size violation

    I've recently started seeing messages like this on my firewall (separating my internal mail server from my DMZ antispam device). I'm not sure if this is tied in to any firewall IOS upgrades I've recently completed (recently went from 8.2.x to 8.3.1 t