Open url with createTempFile fails

I am deploying a Java application which needs to use a web browser-based application to draw some data and save the data as snapshots. It works fine on my localhost version, but in the deployment environment, it fails. The browser launches on the deployment server but the I think it cannot find my temporary file for the URL because it fails to receive the messages I am sending it. The code below does not throw any exceptions so that is my best guess.
If it's a path problem, how do I get the temp file to be seen by the browser and load the page properly?
try {
File shortcut = File.createTempFile("DisplayURLs", ".html");
shortcut.deleteOnExit();
shortcut = shortcut.getCanonicalFile();
PrintWriter out = new PrintWriter(new FileWriter(shortcut));
// ... html statements ...
out.println("location.href=\"" + urls[0] + "\";");
// ... more html statements ...
out.close();
Runtime.getRuntime().exec(new String[] {"/opt/sfw/bin/firefox", shortcut.toURL().toString()});
catch (Exception e) {
System.out.println(" browser failure "+e.getLocalizedMessage());
}

In Firefox, you can click file and Save Page As, then save the page as an HTML file. Under Tools>Options or Firefox>Preferences (Mac) you can go to the Applications tab and add HTML as a file type and select DW as the default app to open them.
Personally, I'd caution against that because it messes up things that you really should be using Firefox or IE to open. (CHMs or application help files for example).

Similar Messages

  • Open URL with Dreamweaver

    I'm a webdeveloper who works with tons of different pages each day.  Many of these are sent as URLs by others in the organization, via email, etc.
    To increase efficiency, I'd like to use our testing environment to automatically open URLs with Dreamweaver.  So, basically, open a URL in the test environment (test.example.com/testing123.html), then have a link on the page to open that exact page with Dreamweaver.
    Question is....does anyone know a way to open a specific file with a specific desktop application from the browser??

    In Firefox, you can click file and Save Page As, then save the page as an HTML file. Under Tools>Options or Firefox>Preferences (Mac) you can go to the Applications tab and add HTML as a file type and select DW as the default app to open them.
    Personally, I'd caution against that because it messes up things that you really should be using Firefox or IE to open. (CHMs or application help files for example).

  • Open URL with linkToAction

    Hi, I would like to use a linkToAction to open a url (I can not use linkToUrl), how I can do? What is the code used to open a url? Thanks in advance, regards

    Hi,
    Below is the snippet,
    String urlPath = <URL>
    try{          
    IWDWindow window = wdComponentAPI.getWindowManager().createNonModalExternalWindow(urlPath);
    window.show();
    catch (Exception e) {
    wdComponentAPI.getMessageManager().reportException(e.getMessage());
    Regards,
    Vishweshwara P.K.M.

  • How to open url with two varible

    Hi everyone
    Could you tell what wrong is in this line.          
    String x="http://localhost/Test.php?memberID=ww&movieID=mm";
         Runtime.getRuntime().exec("cmd /c start iexplore "+x);
    why does my Test.php always only get the first parameter?
    Test.php only got member id is ww.
    However movieID become undeclared.
    Is '&' not working in java?
    Thank you very one
    Yang Bin
                   

    The browser is trying to parse the ampersand and following characters as an entity.
    You could try this:
    String path = "http://localhost/Test.php?";
    String parameters = "memberID=ww&movieID=mm";
    try {
        String request = path + java.net.URLEncoder.encode(parameters);
        Runtime.getRuntime().exec("cmd /c start iexplore " + request);
    } catch (Exception e) {
    }This may also require modification of your php.ini file (not sure).
    Check here for more:
    http://www.w3.org/TR/html4/appendix/notes.html#h-B.2.2
    Hope this helps...

  • How to open url with two varible(URGENT)

    Hi everyone
    Could you tell what wrong is in this line.
    String x="http://localhost/Test.php?memberID=ww&movieID=mm";
    Runtime.getRuntime().exec("cmd /c start iexplore "+x);
    why does my Test.php always only get the first parameter?
    Test.php only got member id is ww.
    However movieID become undeclared.
    Is '&' not working in java?
    Thank you very one
    Yang Bin

    Try :
    String x="http://localhost/Test.php?memberID=ww&movieID=mm";
    Runtime.getRuntime().exec("cmd /c start iexplore \""+x +"\"");
    the command should look like :
    cmd /c start iexplore "http://localhost/Test.php?memberID=ww&movieID=mm"

  • Captivate 6:  Issue with clickbox opening URLs

    I've finally made the leap for an actual client project to 6.0 (usually only do client work on 5.5) and am gutted to have run into quite a perplexing issue. It's a bog standard piece of work.  Simple conversion of a client storyboard (all their ID) into a captivate module.  There's no audio.  It has a couple of widgets in it to allow playing of hosted video and drag and drop games and a pile of advanced action stuff, but nothing exceptional.   Client has no LMS, but is hosting it on a sharepoint.   We've set it up so you can only get to the screen the 'click to start next module' once you've completed the module (the client's request).
    No issues at all in our development testing.  No issues in our small group user testing.
    We've now gone to our final user testing (about 30 users in various locations worldwide) and four of them have the same issue:
    - They click on the button at the end to launch the next module and nothing happens.
    It's very frustrating for me because I can't replicate the issue at my end, and because of the way the contract is set up I'm not allowed on site, nor to contact users directly, so am having to trouble shoot via email with single point of contact middleman.
    It is a simple click box, with an open URL function.     It works fine for me.  It works fine for 26 out of 30 users.  It point blank doesn't work for 4 out of 30.  
    It's a SWF output to flashplayer 10.     All users have IE7+ and Flashplayer 11+
    I've rebuilt the clickbox slide from scratch once.  It is on top.  It works for me.   It still doesn't work for this small number of users.  
    Undertandably, the client is reluctant to go-live to 800+ global users with that kind of test fail rate.  (Weirdly all the risky stuff like the video and the drag and drop works fine on the affected users!)
    Yikes!  Any ideas?

    Hi Rod, thanks for the reply.  Like I say in the post because of the way the contract is set up (I'm arms-length subcontracting for the physical training provider) I'm not allowed on client site, nor to contact users directly, so am having to trouble shoot via email with single-point-of-contact middleman.)  The arrangement is every bit as frustrating as it sounds, but is what it is.
    So I am taking their word for it. 
    That said, I've no reason to doubt them as the same issue has been reported independently from different physical locations, and all the test users will have managed to find their way sucessfully through far more complex functionality before they get stuck at that point.
    I know that from time to time when you run flash locally you can have problems launching URLs unless local flash player settings are updated to allow it - is there any network level equivalent that a company (or even local machine) may have in place that could cause the same behaviour?   Or am I barking up the wrong tree?

  • I get error message: "An error occurred with the  publication of album...Authentication with server failed...whenever I open a facebook file in my iPhoto. In each file, most of my photos have disappeared. What do I need to do?

    I get error message: "An error occurred with the  publication of album...Authentication with server failed. Please check your login and password information" whenever I open a facebook file in my iPhoto. In each file, most of my photos have disappeared. I am hoping I can retrieve these "lost" files. What do I need to do?

    Message was edited by: leroydouglas
    better yet, try this solution:
    https://discussions.apple.com/message/12351186#12351186

  • Opening a url  with parameters in an application

    I'm able to open a url in a browser from my application, but I want to open a url with parameters.
    for instanse http://mypage.asp?parameter=a
    You get a file not found. Is this possible?
    I'm currently using
    Runtime.getRuntime().exec( "cmd /C start " + url);

    Found the answer -- you have to put the url in quotes lest the ampersands parse the end off.

  • 3.6.13 OS MAC 10.6.6 - cannot open url within Mail with Firefox as default browser

    new iMac (March '10) - no problem til last week - as above - when
    Firefox is my default browser cannot open url's form within Mail.
    OK when I change over to Safari - but going back to Firefox same issue.
    Firefox browser opens but the page does not load....
    any suggestions?

    I have the same issue. One interesting piece of info is if you quit FireFox (go to dock > right click on firefox icon > quit) Mail will then launch the link into FireFox properly. Somehow though users actions must cause it to fail again. My wife uses our iMac more than I do for email, so I haven't been able to re-create what she is doing to lose the Mail > Firefox functionality. Almost sounds like an OS X bug??

  • Firefox problems with Open URL vi

    I am using Open URL in Default browser to display the contents of a file.
    If IE is the default browser and the file is xyz.htm it works but not if the file is xyz.html.
    On the other hand if Firefox is the default browser it works if the file is xyz.html but not if the file is xyz.htm.
    One further "quirk" with Firefox is that Firefox must be running for the file to display. If Firefox is not running Firefox starts but then instead of displaying the file I want it goes to a web site that sells Czech language books!
    Is there any way I can resolve these differences? Can I find out what is the default browser? Can I see if Firefox is already running? Any suggestions?
    Note: this is all in windows. I haven't tried it yet in Mac OS.
    David

    I think you're referring to the "Open URL in Default Browser" that you access from the Function Palette->All Functions->Application->Help subpalette. That VI is a simple wrapper around the "Open URL in Default Browser core" VI. Basically, to get it to work with Firefox you need to bypass the "Search and Replace" operation that it's doing, and then append a space to the URL that you enter and feed that directly to the "Open URL in Default Browser core" VI:
    This will still work if IE is the default browser
    Message Edited by smercurio_fc on 08-07-2006 11:14 AM
    Attachments:
    Open URL in Default Browser (string)d.png ‏3 KB

  • Opening BBP_POC using a url with a PO number

    Hi all,
    I'm trying to create a URL with an purchase order number (or guid) to open it directly in the transaction (BBP_POC).
    I do not want to use ITS.
    Is it possible? How can I do it?
    Thanks,
    Ronit.

    Hi all,
    I'm having the same issue, can anyone help?
    Thanks,
    Tomer.

  • Crash when creating advanced action with "open URL"

    Hi there,
    my crash problem (captivate 5.5, win 7 64 bit, adobe PP CS6 installed):
    On one slide of my project, I have a slide video and a button at a certain point. First I created an advanced action (open URL in a new window and pause slide video). Then I saved the action and assigned it to the button. Til here, all was ok.
    Then, I wanted to change the URL in the advanced action.
    When I opened the created action, the "open URL"-parameter disappeared, but the table row was shown empy:
    Then I wanted to assign a new URL. After creating a new "open URL"-paramter I wanted to save the changes. And then captivate crashed with this fatal error:
    And from this time, every time I want to change - or even create a new action with the above mentioned parameters - captivate crashes.
    can anyone reproduce this error? Is this a bug (or a feature ;-), or did I something wrong?
    Thanks
    Markus

    Hi Aditya,
    thanks for your post.
    2. Create a new project and try the same thing
    I created a new project....same problem...
    If you face the same channel, then try recreating the Adobe Captivate preferences. Please follow the steps mentioned here :
    1. Close Adobe Captivate.
    2. Locate the preference folder:
            Windows Vista and Windows 7: C:\Users\[user name]\AppData\Local\Adobe\Adobe Captivate 5.5 folder
    3. Rename the preference folder.
    I didn't found a preference folder in the captivate 5.5 folder. Here is my captivate 5.5 folder:
    what to do now?? Now I am at a loss...

  • Need assistance with Captivate 7 Action - Open URL/File

    Hi folks,
    I am developing a Captivate application that will be published as an executable.  It contains one slide, containing a number of buttons that will perform various operation.
    My issue is with the Open URL or File option.  I need one of my buttons to launch a small telnet app.  It currently exists on my desktop.  When I browse to find that file, it opens Firefox, and wants to download the file again.
    I need an action that will open the app, not a a web browser.
    Can this be done?
    Thanks in advance
    Steve

    Jim,
    You did it!  It worked.
    I thought about the onLoad function in the new browser, but I couldn't control the menu bar, tool bar etc. without re-directing the user to yet another window.

  • Cannot open the document with 'Composition failed to load'.

    After confronting an error message during the publishing, I cannot re open the document with 'composition failed to load' message.
    I desperately need to save this document! is there any chance to save it?
    the screenshot is here.

    Thank you for your help and advice.
    It is great to be fixed in near future. good news!
    Kim Kyoung Hong
    Sent with Airmail
    켜짐 2014년 10월 14일 에서 오후 3:58:58, Bharadwaj ([email protected]) 작성됨:
    Cannot open the document with 'Composition failed to load'.
    created by Bharadwaj in Edge Animate CC - View the full discussion
    This is the error you are getting when you are opening the published content on web. This is a bug, but you can use the below fix.
    Open the publish/web/index_edge.js and remove the "use strict"; statement at the beginning.
    This will fix the problem. We will address this issue in the next release.
    Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at https://forums.adobe.com/message/6822974#6822974
    Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page:
    To unsubscribe from this thread, please visit the message page at . In the Actions box on the right, click the Stop Email Notifications link.
    Start a new discussion in Edge Animate CC by email or at Adobe Community
    For more information about maintaining your forum email notifications please go to http://forums.adobe.com/thread/416458?tstart=0.

  • Problem with Yahoo Maps..."Error Opening URL..."

    I am trying to use a yahoo Action Script 2.0 map to display real estate listings from an xml file. I often receive the following output error, which prevents the entire yahoo map from opening:
    Error opening  URL  ‘http://maps.yahooapis.com/xml/apiconfig.xml?r=988’ (the last 3 digits are random and change each time the problem occurs)
    I have searched the internet for a solution and cannot find one.
    I have emailed yahoo, who has not responded, as well as other people who have had the problem, but they cannot remember what they did to solve it.
    Please help!

    No, I'm not doing anything to handle security issues.
    What I have done is downloaded all the .as files that yahoo uses for their maps (from http://modestmaps.mapstraction.com/trac/browser/trunk/reference/YahooMaps/com/yahoo/maps?r ev=6), including the xml file (http://maps.yahooapis.com/xml/apiconfig.xml).
    What I am thinking, correct me if I'm wrong, if I go through all the class files and change their names from "com.yahoo.maps.insertscriptname1.as" to something defining my own server (ie. mikeraydesign.maps.insertscriptname1.as), and point to the xml file from the one .as file that points to the one with the security issue, this might work.
    I don't know if it will, but I don't think it can hurt.  What do you think?
    Regardless, lets say I put all the files into my own folder on my server, (ie. www.mikeraydesign.ca/maps/), how would I go about importing those scripts from my fla?  The fla needs to import 4 initial classes, which then point to all the others (in the link I have above).  How do you point to online class files?  Would this even work?
    Thoughts?

Maybe you are looking for