GetAppletContext().showDocument() won't show local files for some people

Hi,
I have a reporting function that creates a pdf and stores on the users computer in the local temp drive and then displays the created pdf in a new browser window. Everything works fine except for some users it won't show local files. This is a signed applet and everyone has the same policy file. I can't work out why it works for some users and not for others, there doesn't seem to be a pattern in o/s, configurations etc. When i run the code locally on tomcat it works for me but when i upload to server it doesn't. There is no error message either. The pdf is definitely being created as well as you can check it in the temp directory. Code is below:
void btnReport_actionPerformed(ActionEvent e) {
try {
String args[] = {"-pdf"};
File f = File.createTempFile("SCReport", ".pdf");
FileOutputStream fos = new FileOutputStream(f);
JCPrinter printer = SCPrintManager.getPrinter(args, fos);
if (printer == null) {
System.out.println("Printer is equal to null");
// What has been selected?
SCReport report = new SCReport(printer);
Vector vectSubConsultant = createVectorFromScreenInfo();
if (vectSubConsultant == null)
return;
report.addSectionForSC(vectSubConsultant, true);
SCPrintManager.printDocument(report.getDocument(), printer);
printer.getOutputStream().close();
URL reportURL = f.toURL();
URLConnection con = reportURL.openConnection();
ReDirector().getAppletContext().showDocument(reportURL,"report");
catch (Exception ex) {
System.out.println("Error producing report");
ex.printStackTrace();
}

Did you have any luck? As I am trying to do the same thing...

Similar Messages

  • Messages shows my avatar for some people

    I have added Jabber account and sometimes i see that people who i'm talking with have loose their avatar icon and it replaces with mine. Verry annoying to see that. I've tried to remove account and re-create that, but have the same problem, seems something cached inside Messages and i don't know how to reset these caches.
    Any one expireicing the same?
    PS: All latest updates are installed.

    I saw your other thread earlier. I didn't have time to make a response about your embed tag. Your using an old html object/embed code for Quicktime. That can be the reason some people can't view you video. Mainly window users.
    I took both your poster video and main video and put them into a html that has the new code to be used.
    http://www.setfreedenver.org/trashh/
    Take a look at the source code and you will see the difference. Also this code uses javascript so people with windows computers can view the video.
    I use this program to generate the html for Quicktime. It free! And does a great job in making the html code. PAGEot. http://www.qtbridge.com/pageot/pageot.html
    Copy and paste the object/embed tag from the html that PAGEot makes and put that into your html page. Make sure the javascript page travels with the html. Don't forget to copy the javascript tag line from the head.
    Using PAGEot: The poster frame goes under the general tab and the main main is set under the advance tab. You have any question ring back.
    If the above doesn't fix the problem, it will fix it for window users. Also, to view your video. The viewer need Quicktime 7 installed onto their computer.

  • How can i make hyperlink to local file for dowloading

    How can I make hyperlink to a local file for downloading it, it seams that only www links work in web Ui.
    Thanks

    If we assume that you have a LabVIEW application running on your cRIO that is exposing some data through web services, there are a couple of possibilities.
    You can create a web service call that returns the log data. In order for the browser to treat this as a file, you must set the correct content type in the http header. To do this you can't use the default form of data output. Instead you must create an "httpRequestID" input to your web service VI. With this you can call "Write Response.vi" to give the log data and "Set HTTP Header.vi" to specify the type (text/text probably works for a log). You can look at "examples\comm\webservices\address book\FindContacts.vi" to see an example of calling these 2 VIs. Once you create that web service entry point, you can set that as the URL of the hyperlink control and it should work.
    Another option is to have the cRIO application write to a log file that is under the root of the web server running on the machine. (This is the same place the xap for your Web UI Builder application is put.) This file could then be served up through the web server just like any other file.
    With either of these solutions there may be concerns about the browser caching results rather than requesting new content each time. There are additional values that can be set in the http headers with the first solution that can help with this, but I think there is still some variation between browsers.

  • Installed latest icloud app on Windows 8.1 desktop, selected icloud drive but won't show in file explorer. Go back to icloud app and drive deselected. Can select and apply but whenever go back it's deselected again, any suggestions?

    installed latest icloud app on Windows 8.1 desktop, selected icloud drive but won't show in file explorer. Go back to icloud app and drive deselected. Can select and apply but whenever go back it's deselected again, any suggestions?

    Click Photo Stream, look at upper on the right. u can see Open Folder. click there...

  • I got a new computer, and now i cannot access the local files for my website (Dreamweaver)...help?

    I got a new computer, and now i cannot access the local files for my website (Dreamweaver)...
    the new computer is a Mac.
    I see the site on my computer files, but it will not connect with Dreamweaver on this new computer.
    can anyone help with this?
    thanks,
    Margaret

    no special characters...
    see if this gives you any info...

  • I need to make a pdf document, made in photoshop, 'page turn' and then add it to my website. I know I can do this in indesign but indesign will not open pdf files for some inexplicable reason. Any ideas how I can do it without completely starting again?

    I need to make a pdf document, already made in photoshop, 'page turn' and then add it to my website as an e-brochure. I know I can do this in indesign but indesign will not open pdf files for some inexplicable reason. Any ideas how I can do it without completely starting again?

    Hello waitingone,
    please try this (all terms are translated from my German programs to my best knowledge):
    1. Did the creator of the pdf file enable the import options?
    2. See import options: choose an other visibility option for your layer.
    3. Let you show the import options and click into one with a black background and try these out (often a gray is selected).
    4. See trimming: try the different modes there. Often works: "Media".
    5. Is the pdf file (eg from Word) correctly created?
    6. Is the PDF file protected? >>> no import possible.
    7. If that does not help, store the pdf file in Acrobat, repair possible errors, run the PDF Optimizer before placing in InDesign.
    Good luck!
    Hans-Günter

  • I am using a macbook pro with system 10.6.8. I just discovered that no recent files have been backed up to the external disk using Time Capsule.  There is a long list of backups including most recent but no recent files, for some weeks, have been backed u

    I am using a macbook pro with system 10.6.8. I just discovered that no recent files have been backed up to the external disk using Time Capsule.  There is a long list of backups including most recent but no recent files, for some weeks, have been backed up.  I did a full reset of Time Machine.  I disconnected the external drive and reconnected it. It is not a matter of file types, no files and no folders have gotten backed up.  Everything looks normal though unless one goes hunting for recent files on the back up.

    Many thanks.
    With those symptoms, I'd try the following document:
    Apple software on Windows: May see performance issues and blank iTunes Store
    (If there's a SpeedBit LSP showing up in Autoruns, it's usually best to just uninstall your SpeedBit Video Accelerator.)

  • K8N Neo3 nForce 4-4X doesn't show network utilization for some reason

    Has anyone had this problem? If I am downloading something and I check the Windows Task Manager the networking tab shows no activity for some reason. I figure this is probably a known problem, but I haven't seen anything on it yet.

    Quote from: clappi77 on 29-May-06, 02:37:57
    I figure this is probably a known problem, but I haven't seen anything on it yet.
    Nope

  • Even budget is there, still error is showing budget exceed for some commitm

    Hi Friends
    Even budget is there, still error is showing budget exceed for some commitment items.

    see u have not mentioned in which u r getting this error either in internal order or funds mangement if it is fund mangment u need to check the setting at wt time the budget is hitting either at the time of po or delievery , however if it is at the time of po then systems takes care for all the open po in your system and hit the budget.
    Pls check and need any help post
    thanks
    Sanjay

  • Spotify won't sync local files

    When I download my playlist to my android (Sony Experia ST27i) all my local files are unplayable. They do appear on the phone, but when I try to play them it says ''the song is not available''.
    One more thing: when I am on the computer, my phone won't show under ''devices''. 
    I have followed every instruction but nothing works...
    Please help!

    Galaxy S5. Android version 4.4.2.
    None of these methods work. I, too, have tried disabling all firewalls and the antivirus software. I have tried uninstalling and reinstalling both the phone and desktop applications repeatedly. I have updated my router firmware and turned off all router firewalls and enabled UPNP. Offline mode is disabled on the phone. 
    If I uninstall and reinstall the phone app, then close then reopen the desktop application, the phone DOES show up under devices. The large button on the desktop that says Sync with this device is visible when I click on the device. However, the button doesn't work and nothing changes. If I do any navigating within the phone app, the phone disappears from the devices on the desktop and never comes back until I reinstall the android app on my phone. 
    The playlists that I made on the computer that are only containing local files (created specifically to try to fix/assess this issue) do show up on the phone. I have selected "download" on the phone, but the local files never download. 
    People have been complaining about this for so many months without resolution, it's very frustrating. 
    EDIT: I am also running the desktop as an administrator on Windows 7.
    The spotify version running on my desktop is 0.9.14.13.gba5645ad
    The mobile version is 1.7.0.830

  • GetAppletContext().showDocument fails to open XML file on WIN XP SP2

    Hi all,
    I am working on WINDOWS XP SP2, jre 1.4.2_07. I am trying to launch an XML file on the local machine through an applet using
    getAppletContext().showDocument(docURL, "_blank");
    The docURL is of form "file:////D:\temp\doc.xml"
    This fails to open an XML file. There is no traceback in JAVA console or any exception being thrown.
    However, if I try to open "html" or "htm" file with the same applet, it succeeds.
    Is it a known issue on WinXP? Or am I missing any setting or something?
    Thanks
    Rohit

    Does anyone has a alternative solution for this? How to create the files on the server and have the applet display them using showDocument?

  • Search and gnome-documents won't find local files

    Hello all,
    I can't say for sure whether this behavior started before or after I upgraded to GNOME 3.4. Anyway, this issue is that neither gnome-documents nor the default search from the Activities menu (does that still exist?) can find any of my local files. While I get no results at all from the Activities overview, the Documents application only shows my Google Docs documents. I have already checked tracker-preferences, and all the options seem ok (seeking all relevant directories, always refreshing). Have already tried calling tracker-control -rs and rebooting, too.
    Is anyone else having this issue, not being able to perform searches on local files?
    Thank you in advance.
    EDIT: also, I have noticed that the tracker process (tracker-miner-fs) is using nearly 1GB of memory, causing the whole system to slow down.
    Last edited by Renato_Ferreira (2012-04-30 02:16:21)

    I'm having very similar problems. Local documents do not appear in my search results, and tracker-control --status appears stuck at 1% on my home directory.
    Before installing/configuring xdg-user-dirs I had the same gstreamer errors in tracker-extract.log, but those appear resolved. Now I have a LOT of errors similar to the following:
    03 May 2012, 21:44:38: Tracker-Critical **: Extraction task for 'file:///home/ryan/Documents/Desktop/Impact%20of%20Climate%20Change%20Water%20Industry.pdf' went rogue and took more than 20 seconds. Forcing exit.
    and
    03 May 2012, 21:46:30: Tracker-Warning **: Content extraction of PDF Timed out
    EDIT: spoke too soon; it appears my local files are just taking a long time to index. tracker-control --status now indicates progress and some of the docs are starting to populate search results. HOWEVER, I'm still having the above errors with .pdf files.  Do I need some supporting package (an unlisted dependency) to index .pdf files?
    Last edited by rsking84 (2012-05-04 01:54:37)

  • Won't sync local files!

    As the title says, my samsung galaxy s5 just won't sync my local files from my computer. I've read and tried everything the help thread recommended but it just won't work. 

    I have the same problem and it's really annoying! Since the redesign it stopped working for me and I have tried everything (deleting, etc.). Spotify Connect is working, but I can't get Spotify to sync local files to mobile devices....

  • How to copy a page webpage into a local file (for eg C:\\file.doc)

    Hello all,
    i wrote a programm code which can get my system information (date,tomcatversion,jdk version, server name and version and ...)
    if navigate to the url (on my localserver) htt://localhost/pp/version.jsp i would see all this in formation but how can i copy them into to a local file?
    i can create the file with: FileWriter fw = new FileWriter("C:\\file.doc");
    and copy this information line by line with:
    fw.write("Application server name and version:");
    fw.write(application.getServerInfo());
    fw.write("\n");
    But if i write fw.write(new java.util.Date()) // for the system date/time it doesn't work also fw.write(java.util.Date()) ) or fw.write(Date())
    or Date da = Date() and fw.write(da) no result...
    import are:
    <%@page import="java.io.*" %>
    <%@page import="java.util.*" %>
    please help....

    thanks !! what does this means ? It is possible or no yes yes i need i syntax or an example ... i'm new in java :)

  • Spotify won't play local files in newer version (w/o ffmpeg-spotify)

    Hi,
    I have recently updated Spotify from AUR to version 0.9.4.183-1 (updated 2013-10-10) and I'm not able to play local files anymore (I was before). Package maintainer says that the major changes in the last version is that ffmpeg-spotify is not needed anymore to play local files (and so it has been marked as outdated), so I guess it has something to do with this fact. Actually, having or not having installed ffmpeg-spotify does not make any difference.
    Just for the record, I am using PulseAudio, and when I try to play a local file, I can see in the log the following message:
    19:03:25.415 I [audio_driver_linux.cpp:18 ] Using PulseAudio
    Yep, that's all.
    Is this happening to anyone else? Does anybody knows how is Spotify supposed to play local files without ffmpeg?
    Thanks a lot.

    Well, funny enough, I've found the solution the minute after I posted the question. To play local files, the necessary package is ffmpeg-compat (in official repo). So I guess this should be added as a dependency of the spotify AUR package?
    Hope this helps someone.

Maybe you are looking for

  • MDT 2012 State Restore Phase hangs at Restart-Computer Task

    Background: MDT2012 only for OSD.  Configuring Win7 Enterprise x86 for Reference Image creation with Apps installed. Configuration is being done with a VMWare VM. Problem: I have an issue where the sequence hangs on a later Restart Computer task. App

  • Photos app in my mac is not able to open the iPhoto library from my external hard disk.

    I am using iMac (21.5-inch, Late 2013) OS 10.10.3. i have 2 iPhoto library one on my Mac HD and the other on my External HD which i primarily use and which has all the latest photos in it. Now with the new update to photos app in Mac i am not able to

  • Leopard 10.5.2 on MacBook nothing but trouble

    I updated to 10.5.2 soon after its release and I've had no end of problems that has now culminated in the hard drive on this 6 month old MacBook to be totally trashed. I can't even repartition the drive any longer and now it's off to the Apple Store.

  • Having trouble with a CSI episode from season 6

    I downloaded the episode Poppin Tags and about 9 minutes in, the screen goes black but I can still hear the audio perfectly. So there is no video after the 9 minute mark. Any ideas? thanks!

  • 1628: Failed to Complete Installation

    Howdy all. I was having a 1607 error a couple weeks back, got that fixed thanks to b noir, but immediately got a 1628 error that I haven't been able to fix. I've tried the suggestions on this 1628 error that this link gives you: http://docs.info.appl