IllegalStateException:output stream is already being used for this request

How to read binary data in JSP. I know, in servlets it can be done and JSP can handle only character data. When i try to open res.getOutputStream(), it is throwing the following exception:"IllegalStateException:output stream is already being used for this request". Is there any workaround in JSP?

Can you save the file to a location in your server ? Even if you are creating a dynamic image, all you get is a byte array which can be stored in your server. If you can do so, you can set the content type and display the content as mentioned above.

Similar Messages

  • OutputStream is already being used for this request.

    I have been trying to get images fom Oracle Database and displaying from JSP but get an IllegalStateException:OutputStream is already being used for this request.
    My code is as follows:
    <%
    Connection con = cods.getConnection();
    Statement st = con.createStatement();
    String query="SELECT image FROM image_table WHERE id=1";
    ResultSet rs = st.executeQuery(query);
    if( rs.next() ){
    BLOB blob=((OracleResultSet)rs).getBLOB(1);
    byte []bl=new byte[1024*1024];
    bl=blob.getBytes(1,(int)blob.length());
    response.setContentType("image/jpeg");
    ServletOutputStream outs = response.getOutputStream ();
    outs.write(bl);
    outs.close();
    rs.close();
    st.close();
    con.close();
    %>

    Try a plain ol' out.write();

  • Tomcat Error : OutPutstream is already being used for this request

    I'using Jdev3.2 to develop an application based on the dataweb
    beans.
    I'm using the EditCurrentRecord, and the function UseListOfValue
    to disply lovs.
    I deployed the application on tomcat, when the page is displayed
    an execption occur which is 'OutPutstream is already being used
    for this request'
    can someone help me please
    THX in advance
    Ghassen

    can someone help?
    Please

  • HT4848 Is it possible to partition an external hard drive that is already being used for Time Machine backups without it being erased?

    I'm want to use my current external hard drive, which I use for Time Machine Backup, as a recovery disk for Mac OS X Mountain Lion 10.8.2. From what I have read, the recovery disk assistant will erase all data on the external drive unless it is partitioned. Can I partition my current backup drive without erasing it, even though it is already being used for Time Machine?

    It's very simple to test.  Turn off your computer.  Have your time machine backup plugged in.  Hold option and turn it on, keeping option held.  Do you see your time machine drive?  If so, select it and press enter. You'll end up in recovery.  If it works, there you go.  Then just click the apple and restart to get back to your regular desktop.  Then you'll know for when you're ready to do the deed.
    Edit...
    I'm not sure if time machine will think it's an entirely different computer, though, when a hard drive changed, making an actual restore not doable.  Either way, you could still reinstall mt lion fresh and then just migrate after, skipping the need for SL.

  • He iTunes Store account entered is already being used for an iTunes Connect account that distributes Apps

    I am getting the following message when trying to sign up with iTunesConnect for selling our companies eBooks.
    "The iTunes Store account entered is already being used for an iTunes Connect account that distributes Apps. To continue with this application, you must enter a different iTunes account."
    The email account I am using is not being used for distributing apps. We need to sell ebooks.
    We DO have a developer account to sell apps but it is a different email address (confirmed).
    How should I go about getting this straitened so we can get into iTunesConnect?

    That worked, thank you very much! The Apple support document is quite misleading then.

  • How do I determine ethX is being used for this port?

    if one of two ports ethernet card (10GbE) gets connected, how do I know which ethX on linux is corresponding to this port?
    Oracle linux 6.3
    NC523SFP 10Gb 2-port Server Adapter
    HP G5 server
    Thanks!
    Edited by: 943714 on Sep 25, 2012 7:10 AM

    Here is another option:
    Find the interrupt of eth0:
    <pre>
    # grep eth0 /proc/interrupts
    *19*: 163728 IO-APIC-fasteoi ehci_hcd:usb1, eth0
    </pre>
    So it the above example device eth0 uses IRQ 19.
    Then query lspci for IRQ 19:
    <pre>
    lspci -v
    00:03.0 Ethernet controller: Intel Corporation 82540EM Gigabit Ethernet Controller (rev 02)
         Subsystem: Intel Corporation PRO/1000 MT Desktop Adapter
         Flags: bus master, 66MHz, medium devsel, latency 64, IRQ 19
         Memory at f0000000 (32-bit, non-prefetchable) [size=128K]
         I/O ports at d010 [size=8]
         Capabilities: [dc] Power Management version 2
         Capabilities: [e4] PCI-X non-bridge device
         Kernel driver in use: e1000
         Kernel modules: e1000
    </pre>
    For information about the link:
    <pre>
    # mii-tool -v eth0
    # ethtool -a eth0
    </pre>

  • My iMac was stolen in a robbery - no files via iCloud (long story).  I have a new iMac which is set up and being used - how do I recover old iMac files from what looks like back-up files showing on my Time Capsule (also being used for this new iMac)?

    My iMac was stolen - but I think there's a backup on my Time Capsule (which wasn't stolen). I have a new iMac which I've been using normally; I didn't use the 'Restore from...' option at the start because I thought the Time Capsule had nothing on it.  So how do I now recover files from the Time Machine?  I can see various back-ups on the Time Capsule, from various machines - laptops, etc. - but it's not letting me open any of them to see what they contain. Does anyone know how I access this information?

    Use migration assistant.
    See http://pondini.org/OSX/MigrateLion.html
    Although this is only up to Mountain Lion it is still relevant to Mavericks.. only expect Mavericks to kick and buck a lot more.

  • What should i do if my new email address is already been used for an apple ID?

    I have updated my itunes account with my new email address and I obviously want any further emails from apple or itunes to be sent to my new email address but I can't add my new email address s my primary email address as I'm getting a message to say "the email address you entered is already being used for an apple account.  If it is yours, you can cancel and sign in using that apple account". 

    Apple ID disabled
    http://support.apple.com/kb/TS2446
    If you still have problem, contact iTunes Support
    https://ssl.apple.com/emea/support/itunes/contact.html
    Message was edited by: Diavonex

  • Audio Stream Recorder - Error: Audio device is already being used by another prog

    I realized that Audio Stream Recorder is does not "work" through server list feature. So I am simply trying to use the manual method of adding URL's to the interface. However regardless of the type of stream, shoutcast, windows media or real audio, I receive the error "audio device is already being used by another program". Does anyone know how to fix this? I have closed my audio application etc to no avail. <RANT WARNING> I was very excited about using this application when I read about it. However an application that provides none of the stated features is not an application, its false advertising, since it clearly states on the box, help files and website this products "features". Anyway, it'ss very disappointing. Also, does anyone know what the supported steaming formats are, the help file say the application requires RealONE and Windows Media Player but does not mention audio stream formats? Thanks you in advance for any help.

    I have the same issue. I updated to the latest software, to no avail. My first suspicion is that some Microsoft patch caused this, but I cannot verify this.
    Apparently no one at Creative is very interested in this issue.

  • I'm trying to set up my iPad2.  I am entering my Apple ID and get a message that says "try another apple id, this ID is already being used.  The only time I've used this Apple ID (my email), is when I bought a mac for my college student.

    I'm trying to set up my iPad2.  I am entering my Apple ID and get a message that says "try another apple id, this ID is already being used.  The only time I've used this Apple ID (my emal) was when I purchased a mac for my college aged child.

    Thank you...I had selected the incorrect option to create an Apple ID....so backing up a few pages and doing as you stated worked!

  • My Time Capsule won't allow my computer to back up.  It says it is already in use but that is what it is being used for.

    My Time Capsule won't allow my computer to back up.  It says it is already in use but that is what it is being used for. It has been working fine for years.  All of a sudden I keep getting a message that TC (time capsule) cannot complete back up as it is already in use.  I am doing the backups automatically through Time Capsule.

    Restart the Time Capsule by disconnecting and reconnecting the power adapter. When it's back online, open the AirPort Utility application and check to see whether there's a firmware update for it.

  • Java.lang.IllegalStateException : output stream already retrived Error

    Hi All
    I am trying to integrate crystal reports 10g with oracle 10g AS.My application works fine on TOMCAT 4.1.31,but when I depoly in oracle 10G AS,it shows the following exception
    Java.lang.IllegalStateException : output stream already retrived.
    Any suggestions?
    Regards
    Mohan

    Hello,
    Awaiting help.
    Thanks and Regards
    Mohan

  • Java.lang.IllegalStateException : output stream already retrived.

    Hi All
    I am trying to integrate crystal reports 10g with oracle 10g AS.My application works fine on TOMCAT 4.1.31,but when I depoly in oracle 10G AS,it shows the following exception
    Java.lang.IllegalStateException : output stream already retrived.
    Any suggestions?
    Regards
    Mohan

    Hello,
    Awaiting help.
    Thanks and Regards
    Mohan

  • How to know which Smart-Form is being used for Purchase Order print output

    Hi Gurus ,
    How to find which Smart-Form and and methods/program being used for Purchase Order print output in SRM  ?
    In ECC we have tcode NACE where we can check all the details.Is there something similar in SRM ?
    Please help.
    Regards,
    Saurav

    There is no similar transaction in SRM for your purpose. Usually if the customers customize the smartforms, they would choose to use their own form by implementing BADI BBP_OUTPUT_CHANGE_SF. Take a look into your system and see if this BADI is implemented. If so, debug it (by pressing "Print Preview" for a PO for example) and find out what form it is using. Or, if the BADI is not implemented, by default, the system uses form BBP_PO.

  • Apple IDI am trying to update my IPAD and it gives me a message when I put my email address in:The apple ID is already being used?? I set my Iphone up yeasterday and I only have one email address and one account how do I use it for all my devices?

    I need some help I set my IPhone up yesterday and now I am trying to set up my IPad but I only have one Itunes account and one email but the IPad error message states "The apple ID is already being used" I dont know how to get passed this and my family and I only have one account and we all have IPhones now I dont want them to update if we cant all use the same account. Please help with ideas!!!

    Try here:
    http://support.apple.com/kb/HT4895
    Apple IDs and iCloud)

Maybe you are looking for

  • Iphone 4 network problems after 5.1.1 -

         I'm wondering if others are having problems after updating to IOS 5.1.1. My Iphone 4 is constantly jumping from having 5 bars to 1, then saying it has no service for hours. I have gotten numerous messages saying MMS requires your phone number, a

  • Search Form in Jdeveloper 10.1.3

    Can any body help me how to create search from in Jdeveloper 10.1.3? Because I found search form in 11g by using view criteria, but this is not available in 10.1.3 version Thank you

  • How to create Report Writer Form with page longer than 255

    As i need to create report writer form with many columns which exceed than 1 acceptable page, how can I create since in writer there is no Horizontal Page as in report painter. Thank you very much. Sirirak

  • Projects and Faces missing from Photos on iPhone

    Recently Projects and Faces stopped syncing with my iPhone 4. Only Albums and Places show up on the device. I noticed this when I upgraded to iOS 4.0.2, but it is was a few days before that when I had last looked at photos on my phone. My iPhone is s

  • IPhoto 08 with ATI X1900

    Hi guys, I just bought an ATI X1900 card yesterday and I noticed that when I adjust the contrast slider in iPhoto, the whole screen goes white. This only happens with iPhoto, while my Aperture works fine. I also downloaded the current drivers for the