$35 Amazon Gift Certificate for first Response that solves this problem

Ok, I'm ready to try bribery. I'm good for it.
          I'm on Weblogic 5.1, IE 5.5.
          I'm trying to write a simple JSP on Weblogic 5.1 to open an excel
          file. The program works fine for .pdf. But when I try to pull in an
          Excel file, the program opens excel, but the data looks like binary
          data in plain text.
          What is happening?
          Here is the code.
          String report_id = request.getParameter("report_id");
          InitialContext ctx = new InitialContext();
          DataSource ds = (DataSource) ctx.lookup("oracleDataSource");
          Connection c = ds.getConnection();
          PreparedStatement ps = c.prepareStatement("SELECT pathname, filename
          FROM report_tbl WHERE report_id = ? ");
          ps.setString(1,report_id);
          ResultSet rs = ps.executeQuery();
          rs.next();
          String filename = rs.getString("filename");
          response.setContentType("application/vnd.ms-excel");
          fname2 = "c:\\REV-SS.xls";
          File f = new File(fname2);
          byte[] b = new byte[(int) f.length()];
          FileInputStream fis = new FileInputStream(f);
          fis.read(b);
          OutputStream os = response.getOutputStream();
          

JSPs add blank lines ('\n' characters) ... first you need to get rid of
          those. This particular item has been discussed several times here.
          Secondly, you need to set the content type. Do this by looking for .xls in
          HKEY_CLASSES_ROOT in regedit.exe on Windows. I see that the type is
          "application/vnd.ms-excel" on mine so I assume that's what you need.
          Third make sure that the URL ends with a good XLS file name, such as:
          http://www.blah.com/blah.../GoodFileName.xls
          Now you'll fool the client into working correctly.
          Regarding the gift certificate, just donate $35 to Habitat for Humanity and
          take a tax deduction for it.
          Peace,
          Cameron Purdy
          Tangosol, Inc.
          Clustering Weblogic? You're either using Coherence, or you should be!
          Download a Tangosol Coherence eval today at http://www.tangosol.com/
          "Phil" <[email protected]> wrote in message
          news:[email protected]...
          > Ok, I'm ready to try bribery. I'm good for it.
          > I'm on Weblogic 5.1, IE 5.5.
          > I'm trying to write a simple JSP on Weblogic 5.1 to open an excel
          > file. The program works fine for .pdf. But when I try to pull in an
          > Excel file, the program opens excel, but the data looks like binary
          > data in plain text.
          >
          > What is happening?
          >
          > Here is the code.
          >
          >
          > String report_id = request.getParameter("report_id");
          > InitialContext ctx = new InitialContext();
          > DataSource ds = (DataSource) ctx.lookup("oracleDataSource");
          > Connection c = ds.getConnection();
          > PreparedStatement ps = c.prepareStatement("SELECT pathname, filename
          > FROM report_tbl WHERE report_id = ? ");
          > ps.setString(1,report_id);
          > ResultSet rs = ps.executeQuery();
          >
          > rs.next();
          >
          > String filename = rs.getString("filename");
          >
          >
          > response.setContentType("application/vnd.ms-excel");
          > fname2 = "c:\\REV-SS.xls";
          >
          > File f = new File(fname2);
          > byte[] b = new byte[(int) f.length()];
          > FileInputStream fis = new FileInputStream(f);
          > fis.read(b);
          >
          > OutputStream os = response.getOutputStream();
          

Similar Messages

  • How to disable Setting button in Tools - Options - Advanced - Network..i've read an article that solved this problem..but thats problem contains web adress that couldn't be opened..any other solution??? thanks before best regard

    How to disable Setting button in Tools - Options - Advanced - Network..i've read an article that solved this problem..but thats problem contains web adress that couldn't be opened..any other solution???
    thanks before
    best regard
    -ariansyah-

    You can disable or remove that button, but that won't prevent users from making the changes on the about:config page directly.<br />
    You can lock the related network.proxy prefs if you do not want users to change the connection settings.
    See:
    *http://kb.mozillazine.org/Locking_preferences
    * http://kb.mozillazine.org/network.proxy.type
    * http://kb.mozillazine.org/network.proxy.%28protocol%29
    * http://kb.mozillazine.org/network.proxy.%28protocol%29_port

  • Repost (Amazon gift certificate for answer this time) NT Event ids

    Where can I find information about the different types of event ids (with numbers and descriptions, source tag, type) for what Oracle writes to the NT event log ?
    I offer a $25 gift certificate for the first answer.
    Thanks

    The note in question reads :
    When the Oracle Database Server service fails or fails to start with a pre-
    determined error code it calls the ReportEvent function to write an entry to
    the event log, Windows NT then passes the parameters to the event-logging
    service. This in turn then uses the information to write an EVENTLOGRECORD
    structure to the event log. Other errors are reported to the Alert.Log or
    related trace files.
    When the Windows NT event viewer application starts it uses the OpenEventLog
    function to open the event log for an event source. The event viewer can then
    use the ReadEventLog function to read event records from the log. ReadEventLog
    returns a buffer containing an EVENTLOGRECORD structure and additional
    information that describes a logged event.
    Oracle Database Server Event Log Messages
    =========================================
    The following list defines the events that Oracle may put into the NT Event
    viewer :
    MessageId Severity Description
    ========= ============= ==================================================
    1 Informational This is a test event.
    2 Warning Not used: Allocating SGA.
    3 Informational Not used: Allocation PGA
    4 Informational Initializing SGA for instance %1.
    5 Informational Initializing PGA for process %1 in instance %2.
    6 Informational Not used:
    7 Informational Not used: Initializing Fixed Part
    8 Informational Shutdown normal performed on instance %1.
    9 Informational Mount shared performed on instance %1.
    10 Informational Shared Dismount performed on instance %1.
    11 Informational Not used: Process Enable
    12 Warning All process in instance %1 stopped
    13 Informational Mount exclusive performed on instance %1.
    14 Informational Kernel memory being freed for instance %1.
    15 Informational Not Used: Oracle process created in instance %1.
    16 Warning Instance %1 has been terminated.
    17 Informational Not used: Prepare for Mount Shared
    18 Informational Not used: Shared Initialized
    19 Informational Not used: Shared Check
    20 Error Archive process error: %1.
    21 Error Could not read file header.
    22 Error Invalid file header.
    23 Error ReadFile() failure.
    24 Error Truncated read.
    25 Error WriteFile() failure.
    26 Error Truncated write.
    27 Error Unable to close file.
    28 Error Disk full.
    29 Error Unable to allocate memory: malloc().
    30 Error Unable to allocate memory: VirtualAlloc().
    31 Error Unable to begin another thread.
    32 Error Maximum number of ORACLE threads reached.
    33 Error Unable to acquire internal semaphore.
    34 Informational Audit trail: %1.
    The above list is correct up to and including release 8.1.6
    Bob
    (no payment required!)

  • Gift certificate for friend, download to same computer problem

    Hi,
    I purchased a gift certificate for my girlfriend from my own account.
    She received the email gift certificate, hit 'redeem' however the album didn't download. Unfortunately going back to the email and hitting the 'redeem' bring up a message saying this code has been used.
    Is there an issue if she trys to download the tunes onto the same computer as i have all my purchased music?????
    Thanks
    Rustybob

    First, is she logged into the account through which she redeemed the certificate and ordered the album? If so, first have her check to make sure it's not still sitting in the Shopping Cart and not actually purchased. If not, have her try the "check for purchases" command under the Advanced menu; the album may be sitting there waiting to be downloaded.
    Hope this helps.

  • Localized Amazon Gift Certificates

    Hello SDN Team,
    as a price for the first 1000 points in SDN I've received a 50 US Dollar Amazon Gift Certificate. The problem was that I'm living in Germany and this Certificate is not valid in the Amazon Shop amazon.de. So I had to order via amazon.com. This resulted in 14,45 $ Shipping and with a Goods price of 57,45 $ in 11,07 Euros customs duty. So my 50 $ certificate was worth only 25. I would suggest that if you plan to give this prices in future it should be localized to the location of the winner.
    Regards
    Gregor

    Hi Gregor,
    That hurts. We were not aware, that the Amazon Gift Certificates are not transferable to local Amazon shops. So lame from and you wonder how international they are after all.
    If you want to get around the shipping and customs, check out their eBooks section. Of course it does not help when you don't like to read books on your computer or PDA
    We will find other gift certificate programs in the future, their loss.
    Sorry to you and all the others for this disappointment, Mark.

  • I want to give an email gift certificate for a single song download ($1.10)

    Hello
    Is there a way to give an email gift certificate for less than $10 USD?
    I want to give an email gift certificate for a single song download ($1.10) and can't figure out how to do it.
    Please help
    Thanks
    Richard

    There isn't a way to purchase a gift certificate for that specific amount, but it is possible to gift one particular song to someone as a gift. You can read about it here.

  • Gift Certificate for NI Week 2012 worth $500

    Hi I Have a Gift Certificate for NI Week 2012 worth $500, unfortunately i'm not able to attend NIWeek and any body can offer to have the GiftCode.
    Thanks!
    Ashok

    Matt got the certificate. Thanks for a great community. Tom
    Tom Lohre artist/scientist
    Has a operating painting robot using RoboLab/RCX
    Developing a LabView/ NXT robot that analyzes an image for aesthetic quality.

  • HT5557 Can you buy gift certificates for specific books in iTunes Store?

    Can you buy a gift certificate for a specific book in the iTunes Store?  If so, can you print it?  If the recipient does not want the book, can he or she get iTunes credit instead?

    You can try leaving feedback for Apple : http://www.apple.com/feedback/itunesapp.html

  • Can I buy an iTunes gift certificate for someone outside the U.S.?

    can I buy an iTunes gift certificate for someone outside the U.S.?

    Yes, but they can only be redeemed in the US Store.

  • Email gift certificate for different iTunes store?

    Hi,
    I wish to give an email gift certificate for a friend in Japan. But my iTunes store account is in US. Can I purchase the gift certificate from a US iTunes store for my friend to use on a Japanese iTunes store? If not, what is the best way to give a gift across the border?
    Please advise. Thanks in advance.
    Yitping

    Buy one directly from an Apple Retailer or Reseller Store;
    The card needs to be purchased in the country it is for. Can't purchase a gift card from Apple in the US and use it in a different country's store.
    Same as eBay (which I wouldn't recommend). The card needs to be originally from teh country it is to be used in.

  • Gift certificate for Canadian friend

    I bought an itunes gift certificate for my friend in Canada and she can't use it. Turns out it's only valid for U.S. citizens. When I log on to itunes Canada and try to buy a gift cert there, it takes me to my U.S. account music store so I'm in the same boat.
    Does anyone have any suggestions?

    ANything bought with US money on the store can only be used in US store you may want to check this link out and email apple about this to see if you can get your money back and see how to send a gift to your canadian friend http://www.apple.com/support/itunes/musicstore/giftcertificate/

  • I have a $100 gift certificate for the app store.  Can I use this credit to buy an apple TV?

    I have a $100 gift certificate for the app store.  Can I use this credit to buy an apple TV?

    No...
    "You can use your Back to School Gift Card to download apps, music, books, and more from the Mac App Store, the iTunes Store, the iBookstore, and the App Store."
    From here >  http://store.apple.com/us/browse/campaigns/back_to_school
    Not the Apple online store for products such as an Apple TV.

  • I do not have a credit card to purchase in the itunes store.  I do have an itunes gift certificate.  How can I use this card when I do not have a credit card?

    I do not have a credit card to get through to the itunes store.  I do have an itunes gift certificate.  How do I use this if I cannot get through the ID part to redeem my gift card? Thanks

    Hi cstafford84,
    Thanks for visiting Apple Support Communities.
    If you have not logged in to the iTunes Store before, first follow the steps in this article to create your account without providing a credit card:
    Creating an iTunes Store, App Store, iBooks Store, and Mac App Store account without a credit card
    http://support.apple.com/kb/HT2534
    Next, use the steps in this article to redeem your gift card:
    Redeeming iTunes Gift Cards and download codes
    http://support.apple.com/kb/ht1574
    All the best,
    Jeremy

  • Using iPod shuffle 4th generation for first time and receiving the error : one of the USB devices attached to this computer has malfunctioned, and windows does not recognize it. For assistance in solving this problem, click this message

    Using iPod shuffle 4th generation for first time and receiving the error : one of the USB devices attached to this computer has malfunctioned, and windows does not recognize it. For assistance in solving this problem, click this message.
    Using win 7 and latest iTunes [10.6.3]. Have already gone through below links and did not find any solution.
    http://support.apple.com/kb/HT2292
    http://support.apple.com/kb/TS1369
    http://support.apple.com/kb/HT1923
    http://en.kioskea.net/forum/affich-17997-ipod-not-detected

    I was hoping it would be something like a USB device conflict, but now the shuffle is the only thing connected...
    This article was one of the ones you linked to above in your initial post
    http://support.apple.com/kb/TS1369
    Under Part 9. Verify that USB drivers are installed, did you try the steps in If only "Unknown Device" appears?  That appears to be your situation.
    Also, you said that the shuffle initially worked well enough to do a sync, then it had the same problem again.  If you can get it to work again initially, before doing anything else, try the following.  Select the shuffle in the iTunes sidebar, under DEVICES.  Over to the right, go to the Summary tab.  By default, the checkbox for Enable disk use should be unchecked.  If so, check it and Apply the change.  See if that makes any difference. 
    (If Enable disk use was already checked, try unchecking it and Apply the change.  Basically, set it the "other way" and see if there is any improvement.)
    NOTE:  When disk use is enabled, you have to eject the iPod in iTunes before disconnecting it physically.
    If the disk use change makes a difference, that may provide a clue about the actual cause.

  • I guess the problem come from me or I really need those contacts before he calls me for it. I'll try some method that I got from some responders on your support website. Do you have or can you recommand any software that can solve this problem?

    I guess the problem come from me but I really need those contacts before he calls me for it. I'll try some method that I got from some responders on your support website. Do you have or can you recommand any software that can solve this problem?
    One more thing. I just update my iphone that my boss gave to me but it seems to be like it giving me some trouble. My iphone was updated not too long and was successful. I try to lock into it and it telling me emergency call. I plug it to my itune and it telling me that the sim card is not valid or supported. So I inserted my sim card that I usually use to call and it still saying the same. Please help me get into it.

    And as far as paying for phone support, here are a few tips:
    If you call your carrier first and then they route you to Apple, you usually don't have to pay for phone support.
    If you are talking to Apple and they ask you to pay a support fee, ask if you can get an exception this time.  That usually works once, but they keep track of the times you've been granted such an exception.
    If you still end up paying the support fee, that fee only applies if it's not a hardware related issue.  In other words, if it can be fixed by just talking over the phone and following Apple's instructions, then the fee applies.  But if your device is deemed to have a hardware failure that caused the issue, then the fee should not apply, and you can ask for it to be waived after the fact.
    This forum is free, and almost all of the technical support articles the Apple tech advisors use are available on this website.  Literally 99% of what they can do over the phone is just walking you through the publicly available support articles.  In other words, you're paying the fee to have them do your research for you.  It's like hiring a research consultant to go look stuff up in the public library so you don't have to.  You're capable of doing it; you'd just rather pay someone to do it for you.
    It's like Starbucks.  You know how to make coffee.  Everyone knows how to make coffee.  And Starbucks coffee isn't any better than what you could make at home for far less.  But you want the convenience.  So you're really paying a convenience fee.  Milk is more expensive at 7-Eleven than it is at the grocery store... because it's a convenience store.

Maybe you are looking for

  • Creating a new disk inage

    I am trying to make a new dvd from another one and in disc utilities when new image is clicked the error message tells me "permission is denied. " If I click, verify permissions, before clicking New Image it tells me"Not available because the selecte

  • BAPI_PO_CREATE1, Service line, PREQ_NO

    Hi friends, I use bapi_po_create1 in combination with purchase requesition and service. Retunrvalue is with Msg: SE 518 - No account assignment exists for service line 0000000010. Population  is without preq_no and item possible. If I use transaction

  • Upgrade OS 10.5.8 to Snow Leopard - any problems?

    My computer info: Model Name: iMac Model Identifier: iMac8,1 Mac OS X Version 10.5.8 Processor: 2.8 GHz Intel Core 2 Duo Memory: 2 GB 800 MHz DDR2 SDRAM Number Of Processors: 1 Total Number Of Cores: 2 L2 Cache: 6 MB Memory: 2 GB Bus Speed: 1.07 GHz

  • PDF prints a thumbnail and backwards

    I recently upgraded a user to Acrobat Reader 9 and since then, when he tries to print a paper copy of PDF's to his post script printer, they come out as inverted and the size of a thumbnail picture.   Even if he sets the printer to the proper paper s

  • Does using the skype app (from my iphone to a computer)over 3G cost me money, or is it free like Wifi?

    I was at a family dinner last night and included my college daughter at the table via Skype on my iphone. She was on her laptop. After about 30 minutes, I remembered that my mother-in-law does not do technology, and has no internet, so I was on 3G, a