Cookie problem and intermittent redirect fail.

This code fragment:-
Cookie k00lCookie1 = new Cookie("username", cookieUsername);
k00lCookie1.setMaxAge(9999999);
k00lCookie1.setPath("/");
response.addCookie(k00lCookie1);
rd.forward(request, response);
Is intermittently causing the following error in tomcat:-
Cannot forward after response has been committed
There is NOTHING in the code above this that writes to the output buffer. Am I attaching the cookie in the wrong way ? Does adding the cookie to the response object count as committing something to the response ? And why is it only intermittent ? Is it something to do with the users browser settings ?
Help please!

I'm kind of shooting in the dark here, since I don't have enough info, but... try disabling cookies in your browser and see if the problem changes from an intermittent one to a constant one.
Maybe when the user has cookies switched off, there is some other section of your code that depends on a session being present, and when it is not, sends something (doesn't have to be html markup, a space char of a newline will suffice) to the client before the forward...
Also, are you using that code inside a servlet or a scriplet in a JSP page ?
And could you post the whole code section ?

Similar Messages

  • Can't load Netflix - Firefox says something about cookie problem and recommends try again button. ("The page isn't redirecting properly Firefox has detected tha

    Can't load Netflix - Firefox says something about cookie problem and recommends try again button. ("The page isn't redirecting properly Firefox has detected that the server is redirecting the request for this address in a way that will never complete. This problem can sometimes be caused by disabling or refusing to accept cookies.)" Hit the try again button repeated ly - nothing???

    I decided to give Netflix a call about this problem.
    On a recording while waiting for a support rep, it said if you're having problems logging in to go to:
    http://www.netflix.com/clearcookies
    It works for me. Now I have to logon everytime I go to their site though versus it had kept me already logged in before this problem.
    I will be using that link to get to their site until they get it fixed.

  • Start up problem and Disk Repair failed...

    I recently did an update on firefox and an update on adobe flash. Right after I did those updates, I turned off my computer and couldn't restart!!!
    First time I tried to boot, I got to the apple icon with wheels around it. But it just set there like that for several minutes. So I forced it to shot down.
    After that, every time I tried to restart I came to a grey screen with a small folder appeared in the center and a flashing question mark...
    I then followed instructions in this link: http://support.apple.com/kb/TS1417
    It failed to safe boot and disk repair.
    I received the following message while doing the disk repair:
    "First Aid failed. Disk Utility stopped repairing disk3 because the following error was encountered. The underlying task reported failure on exit."
    "Repairing disk for disk3
    checking HFS Plus Volume
    Catalog file entry not found for extent
    Volume check failed
    Error: The underlying task reported failure on exit (-9972)
    Repair attempted on 1 volume
    0 HFS volumes repaired
    1 volume could not be repaired"
    Can this G5 still survive without changing a HD? Could you please help on this issue? Many many many many thanks!!!

    If it's just data corruption, erasing the drive will fix the issue. If it's a physical problem with the drive, then no; you will have to replace the drive.
    The next thing to try is starting up from your Mac OS X installation disc (for the currently installed system release); insert disc and restart while holding down the C key.
    When you get to the first Installer screen, go up to the menu bar and select to run Disk Utility from the Utilities menu. In the sidebar, select the internal drive; select the drive and not the volume indented under the drive. Go to the Erase tab. Name the volume +Macintosh HD+ and set the format type to +Mac OS Extended (Journaled)+. Then erase, which will re-partition and reformat the drive. This will obviously erase any existing data on the drive.
    If the drive is physically OK, this process should complete in less than one minute. If it does, quit Disk Utility to go back to Installer. Run a standard installation on the blank drive.
    If the erase process errors out or stalls, you probably have a faulty hard drive.
    If the erase process completes successfully, but the subsequent Mac OS X installation stalls (or takes forever) or fails with error, please post back.

  • Freeze-ups, problems, and "First Aid Failed"

    I've been experiencing some freeze-ups lately on my Macbook Pro. I verified and repaired disk permissions on Disk Utility, but when I went to verify the disk itself, it said "First Aid Failed". It did say "Volume Bit Map needs minor repair" and "Invalid volume free block count (It should be 815187 instead of 814946)" and "The volume Macintosh HD needs to be repaired."
    "Error: The underlying task reported failure on exit"
    "1 HFS volume checked
    Volume needs repair"
    What should I do to fix this problem? Thanks.

    Jaworski
    If you can't find anyone with the right install disks but (depending on the size of your startup volume) you can get your hands on an external drive of some kind you might want to try using CarbonCopyCloner to clone your basic system to it, selecting it as your boot volume in system preferences, booting from it, and then repairing your internal drive using Disk Utility from the cloned install.
    It's definitely not the most elegant solution, especially since you would essentially be attempting to fix a corrupted volume with a corrupted volume, but it might be worth a shot in your case due to the limited availability of your install disk.
    Just a thought.
    Max-

  • Cookie problem with this forum?

    Today I am no longer able to connect with this forum with my Safari browser. All I receive in a page with the 6 categories and nothing else. Also, I am not able to log in. However, I can log in using Foxfire with all the topics correctly displayed. I suspect it must be a cookie problem and if that is so, I'm not sure where to go in Safari to delete cookies.

    Same problem is back after only one day. When using Safari (latest version), if I click on the following link...
    http://discussions.apple.com/category.jspa?categoryID=218
    All I see is the Category headings (no latest posts) and I'm NOT automatically signed in. When I attempt to sign in, I then go the the "new user" data page. After signing in, I get very restrictive access to the forum.
    When I sign in with Firefox, everything is normal. Yesterday when I had this problem, I erases the cookies from Safari and everything returned to normal. I hate to have to erase my cookies everyday to get access here as I prefer to use Safari.
    Is this happening to anyone else?

  • Unresponsive keyboard/trackpad and intermittent Bluetooth on MacBook...possible internal USB problem?

    I have a mid-2010 polycarbonate/white MacBook (model A1342) running OS X 10.6.8. My machine has been having issues with the internal Bluetooth and keyboard/trackpad randomly ceasing to function.
    Bluetooth issue
    As of recently (the past month or two), the Bluetooth adapter will completely disappear and eventually reappear on a random basis. It won't appear at all in System Profiler, and the BT menu says "not available". Also, I have had a few kernel panics recently, all of which were apparently thrown by a Bluetooth process/daemon/driver (unfortunately I forgot which one, and also lost the logs from the panics.)
    My system has a Broadcom Bluetooth chip that's part of the AirPort card, but is basically just an internal USB device. The adapter has some sort of integrated USB hub ("BRCM2070 Hub"), which the "Bluetooth Module" device itself is connected to.
    Nonetheless, this seems to be some sort of problem on the USB bus. Whenever there is a failure, I will almost always see output in Console showing USB errors (ie errors about "enumerating a USB device", "clearing port power", "setting port power", "getting port status", etc). It will either be on any of the ports of the hub at 0x6600000 (the "BRCM2070 Hub" that "Bluetooth Module" is connected to), or port 6 of the hub at 0x6000000 (BRCM2070's port on the internal bus, which the keyboard/trackpad is also connected to on port 3).
    I can post more/longer ones, but here's a somewhat short example of the error messages I might receive:
    11/18/12 3:18:36 PM kernel USBF: 7351.492 [0xcf9b300] The IOUSBFamily is having trouble enumerating a USB device that has been plugged in.  It will keep retrying.  (Port 6 of Hub at 0x6000000)
    11/18/12 3:18:38 PM kernel USBF: 7353.987 AppleUSBHubPort[0xcf9b300]::FatalError - Port 6 of Hub at 0x6000000 reported error 0xe00002c7 while doing clearing port power feature
    11/18/12 3:18:38 PM kernel USBF: 7353.987 [0xcf9b300] The IOUSBFamily was not able to enumerate a device.
    11/18/12 3:20:20 PM blued[448] Apple Bluetooth daemon started
    11/18/12 3:20:20 PM kernel USBF: 7456.186 [0x11fb1300] The IOUSBFamily is having trouble enumerating a USB device that has been plugged in.  It will keep retrying.  (Port 2 of Hub at 0x6600000)
    11/18/12 3:20:20 PM kernel USBF: 7456.188 [0x11fb1300] The IOUSBFamily was not able to enumerate a device.
    Keyboard/trackpad issue
    There's also an issue where the internal keyboard/trackpad will randomly cease functioning (until I restart), often a couple of times a day as of recently. I've had this issue on rare occasion for a while now, but it's gotten more frequent. And more recently, the caps lock light on the keyboard occasionally turns itself on when I'm away.
    Both the internal keyboard/trackpad as well as the Bluetooth "hub"/device are connected to the same USB bus/hub. When the keyboard/trackpad die, I've noticed that there will be very similar messages in Console to those above and usually a Bluetooth failure at the same time. (In some cases, it seems to notice that the keyboard/trackpad isn't responding, then attempts to reset/reinitialize it...ie log below.) What could the root cause be...could it be the USB "root" hub/bus causing one or both of these to fail, or possibly a problematic device causing the other to lose connection? I haven't had issues with USB devices on other buses failing, though (ie no problems with external devices.)
    Maybe more out of curiosity than anything else, but I've been poking around for info on what might be going on with the USB (aside from the 0x66 hub repeatedly dropping/reconnecting and etc), but can't find much. There seems to be no documentation about the error codes (ie 0xe00002c7) that the hardware/OS are relaying. I even poked through the source for some of the relevant kexts and some reading on OS X driver/kernel programming too...might as well learn more about the inner workings of OS X
    Here's an example of some of the messages that I get about the Keyboard/Trackpad:
    11/21/12 2:57:22 AM kernel USBF: 1439.228 IOUSBHIDDriver(AppleUSBMultitouchDriver)[0xd1ff000]: Detected an kIONotResponding error but still connected. Resetting port
    11/21/12 2:57:22 AM kernel USBF: 1439.234 AppleUSBHubPort[0xd040600]::Resetting device Apple Internal Keyboard / Trackpad: port 3 of Hub at 0x6000000
    11/21/12 2:57:22 AM kernel USBF: 1439.319 [0x14452600] USB HID Interface #0 of device CompositeDevice @ 5 (0x6610000)
    11/21/12 2:57:22 AM kernel AppleUSBMultitouchDriver::message - kIOUSBMessagePortHasBeenReset.
    11/21/12 2:57:23 AM blued[248] Apple Bluetooth daemon started
    11/21/12 2:57:23 AM kernel AppleUSBMultitouchDriver::checkStatus - received Status Packet, Payload 2: device was reinitialized
    Attempted fixes
    Unfortunately, my Macbook isn't under warranty so I'm mostly on my own. First I zapped PRAM, reset SMC, ensured OS updates are installed (still on 10.6.8), and threw out a few drivers/software that were possible troublemakers. Next, I tried running another OS/install to rule out software issues. Accordingly, I found that the BT adapter sometimes disappears on Windows 7 as well (just did a clean install). And finally, I bought a new AirPort/BT card and installed it the other day. That seemed better at first, but I still have the problem of intermittent Bluetooth and keyboard/trackpad.
    Problems/solutions?
    What might the issue be, or is there anything that may be worth trying? As I mentioned, I've reset PRAM and SMC, made sure it's not an OS/driver issue (it happens on Win7 too), and replaced the Airport card. The machine does have aftermarket RAM (from OWC, ~2 years old) and SSD (Crucial M4, installed September)...but it seems unlikely that either of these would cause the problem. There haven't been any accidents that would have caused physical or (to my knowledge) electrical damage to it.
    I also searched for any occurrences of similar problems, but could not find any that were applicable to the Macbook revision in question. There was a similar keyboard/trackpad issue on older Macbook Pros that was caused by stress on a ribbon cable...but that seems unlikely given the concurrent issues with Bluetooth as well as the different design.
    The only thing I can think of next is to possibly replace the cable connecting the Airport card to the logic board, and possibly look at replacing the keyboard/trackpad (topcase). Anyway, I'm worried that it might be a hardware issue with the internal USB controller/hub, which would probably mean that it's unfixable unless I replace the logic board.
    Any advice as to which of these might be a potential solution or cause of the problem? Or might I just as well sell it off in its current condition and replace it?
    Thanks all!

    Has anyone find a fix for this?  I've been using my Dragon Dictate headset on my MacBook Pro for about a year, and then today, when I plugged it in, I got this:
    4/16/14 10:01:04.000 AM kernel[0]: USBF:    47.766    The IOUSBFamily is having trouble enumerating a USB device that has been plugged in.  It will keep retrying.  (Port 1 of Hub at 0x4000000)
    4/16/14 10:01:07.000 AM kernel[0]: USBF:    50.269    AppleUSBHubPort::FatalError - Port 1 of Hub at 0x4000000 reported error 0xe00002c7 while doing clearing port power feature
    4/16/14 10:01:07.000 AM kernel[0]: USBF:    50.269    The IOUSBFamily was not able to enumerate a device.
    Here is what I have tried so far:
    Reset the PRAM
    Reset SMC
    Verify disk (there were no problems)
    Repair permissions
    Boot with an external USB hard drive (which works fine on the "problem" computer) that contained an old SuperDuper clone of my hard drive from several months ago. I received the same "The IOUSBFamily was not able to enumerate a device" error when I plug in the headset.
    Tried to headset on another computer, and it worked fine.
    Plug in an external USB keyboard into the problem computer, and it works fine.
    All of this would lead me to conclude that it is a hardware problem. But it seems that if it were a hardware problem, the external USB keyboard and external USB hard drive would not work (which they do). If the problem were with the headset, it wouldn't work on another computer, but it does.  So I'm wondering if it's some sort of firmware issue…???????  URG!!!!!!

  • Cookies and page redirection

    The following refers to a site I'm working on based on Weblogic 6.1 and IIS
              4.0 :
              I'm currently having difficulties with a site I'm working on where we need
              to check if a visitor has got cookies disabled and redirect them to another
              page to ask them to switch these on.
              I've tried using JSP in an include file at the top of every page on the site
              to do this by writing a test cookie and then trying to read it immediately
              to see
              if the visitor has cookies enabled and then do a response.sendRedirect if
              they don't.
              Unfortunately, JSP can't seem to write a test cookie and then immediately
              read it back
              again in the same response.
              To get round this I used Javascript in an include file to do the same thing
              and then
              tried to do a redirect using location.href = 'cookies.htm' to redirect to
              the cookies
              information page. This works in IE and Netscape 6 but not Netscape 4.
              Netscape 4 redirects to the cookies.htm page but still continues to process
              the remainder
              of the page it was originally trying to open and this causes problems.
              I found a workaround to this which was to include a further bit of
              Javascript at the foot
              of each page for the benefit of Netscape 4 which did a redirect using the
              same method after
              checking a Javascript variable set at the top of the page if cookies were
              disabled.
              This is less than ideal because in Netscape 4 the page attempted to be
              opened displays
              briefly before the redirect at the foot of the page is fired.
              By the way I have to check if cookies are enabled in Netscape 4 by writing a
              test cookie
              because, unlike IE and NN6, Netscape 4 does not support the property
              navigator.cookieEnabled.
              Is there a reliable way for IE, NN4 and NN6 using JSP at the top of every
              page in my site
              to check if someone has cookies disabled, and if so, redirect them to
              another page ?
              Cheers
              Dave
              

    You can set a default home page at group level in Oracle Portal. Upon login through the custom login portlet, the user will be taken to the group home page for his/her default group.
    Note :
    It will work with the login link as well but you need to change the scope of the login link from current page to default home page :
    !http://content.screencast.com/users/suizebol/folders/Jing/media/d9255a17-a935-4d2b-9fb0-65cc6f6fb9a1/00000038.png!

  • I have an iPod Touch version 4.2.1, and whenever iTunes tries to sync my iPod, I get an error message saying "Mobile Backup has encountered a problem and needs to close", and the sync fails.  What can I do to fix this problem?

    I have an iPod Touch version iOS 4.2.1, 8 G capacity, and whenever iTunes tries to sync my iPod, I get an error message saying "Mobile Backup has encountered a problem and needs to close", and the sync fails.  I have tried deleting and reinstalling iTunes, and the same thing happens.  What can I do to fix this problem?

    Try:
    iOS: If you can't back up or restore from a backup in iTunes

  • Back button only works about 50% of the time. Have to hit it twice, sometimes three times before it works. Problem is intermittent. Firefox 3.6.10 on Mac OS 10.6.4 (same on both MacBook and iMac machines).

    Back button only works about 50% of the time. Have to hit it twice, sometimes three times before it works. Problem is intermittent. Firefox 3.6.10 on Mac OS 10.6.4 (same on both MacBook and iMac machines).

    You can try http://kb.mozillazine.org/Bookmarks_history_and_toolbar_buttons_not_working_-_Firefox

  • I had a problem with the hard disk on a 2010 macbook pro. Replaced the hard disk with an Hitachi 1TB and when I tried to erase and format It fails with input/output error. Any help much appreciated!

    I had a problem with the hard disk on a 13" 2010 macbook pro. Replaced the hard disk with an Hitachi 1TB disk but when I tried to erase and format, it fails with input/output error and at other times saying unable to allocate memory. Any help much appreciated!

    Zap the PRAM and Reset the SMC, then try again.

  • HT201210 When trying to update iOS 7.0.4 I get a message saying that the update has failed. Has anyody else had this problem and if so, how did you get round it?

    When trying to update to iOS 7.0.4 I get a message saying that the update has failed. I've followed the instructions on Apple Support. Has anybody else had this problem and if so, how did you get over it?

    Check For Updates.
    http://i1224.photobucket.com/albums/ee374/Diavonex/Album%204/deb765f74dc0acb6038 d1fc55eed7fce_zps9330117d.jpg

  • What is cookies.sqlite and why does it slow the start up of mozilla by a minute or so. I found it and deleted it,fixed the problem, but it reappears eveery time I restart mozilla.

    what is cookies.sqlite and why does it slow the start up of mozilla by a minute or so. I found it and deleted it,fixed the problem, but it reappears every time I restart mozilla.

    AVG reports these sqlite cookies each time firefox starts. they usually belong to tribalfusion or some other tracker. How do I block them in the first place. I thought firefox is a safe browser. Did not have this problem until I upgraded to 3.6.

  • Software Update Problem and Apps Failing to Launch

    Ok, so, I have done a lot of hunting around to resolve this problem, (possibly problems) and tried some of the few fixes I have found, (though all were not exactly describing my problem). Said fixes were mentioned on here and on other sites/forums. Apologies if my post is described and resolved elsewhere. I couldn't find it.
    Firstly, my spec:
    27" iMac
    Lions OSX (10.7)
    3.1 Ghz Intel Core i5
    16GB 1333 MHz DDR3 (installed by myself after purchase)
    (Let me know if you need to know more to understand my computer further)
    This computer is absolutely brand new. All I have done so far is the initial set up and installed Google Chrome and various Adobe software (CS5). Also, I did encounter a Java Runtime error and I appear to have fixed this issue by manually downloading the latest Java software.
    I noticed a problem quite early on when apps were failing to launch/crashing. Frustratingly this isn't black and white. All apps, (both Apple software and third party software (mentioned above)) seem to do a random combination of:
    + Failing to launch - icon bounce a few times and then nothing (no error/dialog box)
    + Crashing - Instantly crashing when opened (typical crash dialog box)
    + Closing down - Open for no more than 5 seconds and then completely closing down (no error/dialog box)
    + Opening fine - An application that was doing one of the above three, but now (for what ever reason) working fine
    For more clarity (though this isn't a rule), this is what each individual software (currently) does that I have tested:
    Mail - Crashing, but now opening fine
    Chrome - Crashing, but now opening fine
    Facetime, Address Book, iCal - Opening fine
    Photoshop - Opening fine, (though I have yet to click around and do anything substantial. Basically it appears to stay open)
    Illustrator - Failing to launch
    Dreamweaver - Crashing
    iTunes, iPhoto - Closing down
    But, like I say, this hasn't been consistent, (for example, Chrome has gone through a process of not working, working, not working and now working).
    To maybe resolve this I have tried to Software Update. It finds various updates and I download them. Download seems fine, but after clicking restart to install said updates, only a second in and an error dialog box appears stating that the update files may be corrupt. It then just restarts without updating.
    First idea (prompted by a pre-existing forum thread), was to delete files found in Library > Caches. After doing this and restarting, nothing appeared to be fixed/resolved.
    Second idea (again, prompted by a pre-existing forum thread), was to repair disk permissions in Disk Utility. After doing this and restarting nothing appeared to be fixed/resolved.
    Any ideas?

    AppleCare's Express Lane. Do note that if you're within 50 miles (80 KM) of an Apple repair station, you're eligible for onsite repair since yours is a desktop machine.

  • HT4095 I rented a movie from the iTunes Store and the download failed. I can't restart the download without error or rent other movies?  Anyone have this problem and found a solution?

    I rented a movie from the iTunes Store and the download failed. I can't restart the download without error or rent other movies?  Anyone have this problem and found a solution?

    1. Sign out of your Apple ID
    2. Reboot iPad
    3. Sign back in to Apple ID

  • I am having problems sending messages.. Once I send it, it just beeps and says it failed to send and I have perfectly good service. Why is this happening??

    I am having problems sending messages.. Once I send it, it just beeps and says it failed to send and I have perfectly good service. Why is this happening??

        Hello llm007!
    That is quite a strange issue. What make & model phone do you have? When did this begin? Are you able to make & receive calls? You can troubleshoot this issue http://vz.to/12TLCsR on our website to get things working as quickly as possible.
    Thank you,
    MichelleH_VZW
    Follow us on Twitter @VZWSupport

Maybe you are looking for

  • 2g shuffle won't appear on desktop or int HD sidebar

    This 2g shuffle appears in iTunes but not on the desktop or when you open the HD. In fact, when you hook up the iPod it briefly appears on the desktop then disappears. It's running software 1.0.2 and iTunes is 7.2. It's a very new macbook. I tried re

  • Importing of Activity Codes

    How to import activity codes (codes with descriptions) from excel into P6?. Thanks,

  • Is there anyway to get photobooth back?

    I accidentally deleted phtotobooth. I took it off the dock, then later on emptyed my trash without realising And I must have also accidentally deleted the app store too. I'm quite sure that the software disk is lost. Is there any way that I can get p

  • Kernel crashing during first boot on VirtualBox

    I'm trying to get install Arch Linux on VM running on my Windows 7, I set up the machine and everything else that was in the guide on wiki, but during first boot, I get kernel error and machine freezes. This is screenshot of error: http://i.imgur.com

  • Mouse over vs On click: ISSUE

    Hello, I hope someone can help me. I have a image (refers to ImageA.jpg) which Im using as a hyperlink to a specific page in the mainframe target. I have successfully created a working image swap on reaction of OnMouseOver (refers to ImageB.jpg). For