Dynamic jnlp - automatic launch

I realize there are some posts on this topic, but nothing recent and nothing particularly concrete. Any insight is much appreciated.
I am dynamically building a jnlp so that I can pass dynamic arguments into my webstart app. I am getting the file download dialog that asks me to either open or save my jnlp file. I am running Tomcat 6. I am using https. I have played with various settings based suggesstions in these forums. My response object looks like this:
resp.setHeader("Content-disposition", "attachment; filename=supply.jnlp"  );
            resp.setHeader("Cache-Control", null);
            resp.setCharacterEncoding(null);
            resp.setHeader("Set-Cookie", null);
            resp.setHeader("Vary", null);
            resp.setDateHeader("Last-Modified", new Date().getTime()); my web.xml looks like this:
<servlet>
     <servlet-name>SupplyJNLPServlet</servlet-name>
     <servlet-class>mil.atc.supply.servlet.SupplyJnlpBuilderServlet</servlet-class>
</servlet>
<servlet-mapping>
     <servlet-name>SupplyJNLPServlet</servlet-name>
     <url-pattern>/SupplyJNLP</url-pattern>
</servlet-mapping>
<servlet>
     <servlet-name>JnlpDownloadServlet</servlet-name>
     <display-name>JnlpDownloadServlet</display-name>
     <servlet-class>jnlp.sample.servlet.JnlpDownloadServlet</servlet-class>
</servlet>
<servlet-mapping>
     <servlet-name>JnlpDownloadServlet</servlet-name>
     <url-pattern>*.jnlp</url-pattern>
</servlet-mapping>
<mime-mapping>
     <extension>jnlp</extension>
     <mime-type>application/x-java-jnlp-file</mime-type>
</mime-mapping>
The jnlp mime type is configured on my IIS server - I am using the Apache ASAPI filters.
Once again, thanks for any help.

dcfrank65, or anyone else... did you ever discover a solution to this problem?
I too have an issue whereby opening a dynamically generated jnlp file over HTTP works fine, but opening it over HTTPS causes IE to prompt whether the file should be opened or saved. As you already discovered, there do seem to be quite a few threads covering this topic, but none with a definitive answer. In my case, the JNLP file is being rendered by ASP.NET code running on IIS.
For the record, at the risk of becoming immediately unpopular (!), AndrewThompson64's comment about how dcrank65 failed to ask a question seems unnecessarily obtuse, since dcfrank65 did previous say:
"I don't want to be prompted to open or save, I want my jnlp file to be executed and the webstart application to run with no further action from my user. +So I am asking for ideas to accomplish this+."
This is a fairly clear and concise request for information, regardless of whether it was phrased as a question. So, dcfrank's response, though a little strong, seems justified.

Similar Messages

  • Dynamic JNLP - displaying using java web start

    Hi,
    I am creating a dynamic JNLP in a servlet at the server side. Please see below.
    String someJnlpString = "<?xml version=\"1.0\" encoding=\"UTF-8\"?> \n" +
                                                "<jnlp .....    >    </jnlp>";       
            String attachment = "inline; filename=\"launch.jnlp";           
            String ct = "application/x-java-jnlp-file";
            OutputStreamWriter out = new OutputStreamWriter(response.getOutputStream());
            response.setContentType(ct);
            response.setHeader("Cache-Control", "max-age=30");
            response.setHeader("Content-disposition", attachment);
            out.write(someJnlpString);{code}
      Then in my JSP, I am trying to open this JNLP  by using the following code
    {code}        window.open('servlet/DisplayImage?arg=first-arg");The exception that I am getting is JNLParseException could not parse launch file. Error at line 0. If I open the downloaded file then its working.
    Can somebody please advise me how can I directly open that JNLP from the servlet by using java web start?
    Thanks a ton,
    Subhash

    I am able to run it now after clearing the java cache

  • How to run the dynamic jnlp generate by jsp, but cache one is not dynamic?

    Hi Web Start expert,
    I need some urgent help on this issue. I want to pass some session info from my protal web app to my java app through web start. I have tried to use a servlet or jsp to generate a dynamic JNLP which will include all the necessary properties. It works fine if I don't include a href attribute in my jnlp tag. but I won't be able to launch the application off line. So I include the href to point to a static jnlp file resides in the same directory where jars are installed. This time when web start launches, my Java application does not seem to recognize all the login properties I passed through web application, and launch the Login Dialog. What I want to do is, if I come from the portal, since I had signed on to the portal, I don't need to login again to the java app. but when next time I click on the offline shortcut on my desktop for my Java app, I need to sign on to launch my Java app that was cached on the client machine. What is the best way to do this? Please help!
    Thanks in advance.
    Jenny

    The problem here is, when you acess the servlet from the browser, the servlet generates the jnlp file with the properties based on the full reference to the servelt (ie: http://myhost.com/servlet?arguments=xxx;yyy).
    If you put the href in the jnlp file:
    <jnlp codebase="http://myhost.com" href="servlet">, When Java Web Start is invoked, it will re-download the jnlp file using just "http://myhost.com/servlet", This will cause the servlet to generate jnlp file w/o the propertys that were based on the arguments and parameters to the url.
    On the other hand, if you try to add the arguments and parameters to the href wirh <jnlp codebase="http://myhost.com" href="servlet?arguments=xxx;yyy"> two problems occur.
    1.) java web start (all versions thru 1.4.2) will generate the cache directory based on the whole string "servlet?arguments=xxx;yyy" this means that every invocation is a seperately cached app, and you will get lots of entries in the download applications page in the Application Manager.
    2.) on some platforms, generating cache directory with "?" or ";" can cause IOExceptions.
    These problems will be addressed in 1.5:
    1 - the cache directory will be based only on the string up to the first "?" or ";".
    2 - jnlp files w/o href, will still be shown in the downloaded applications, and can be launched offline (if offline-allowed)
    In the mean time the only work around I have heard, is someone tried modifying the servlet, to first download the jnlp file with the correct parameters and args but with href="servlet", but caching the jnlp file generated, and then when java web start requested the servlet with no args, a few seconds later, sending it back the cached version.
    /Dietz

  • Dynamic JNLP causes exception on 1st run after java install

    I have a dynamic JNLP file (php) which runs my software. It works just fine, except for the 1st time it is run after a user has installed Java.
    I get the exception; "The following field was missing from the jnlp file: <jnlp>". When I look at the jnlp code in JWS in the "Launch File" tab of the error message, I see that the JNLP is not there - but the page the user would see if he was not logged into the system (as if JWS has cached the file or something).
    If I close it down, press F5 to refresh, and run it again everything works fine.
    I'm running the dyanmic.jnlp?dummy=randomnumber943934 to prevent caching. In addition, these headers are sent: (php code)
    header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
    // HTTP/1.1
    header("Cache-Control: no-store, no-cache, must-revalidate");
    header("Cache-Control: post-check=0, pre-check=0", false);
    // HTTP/1.0
    header("Pragma: no-cache");.. so nothing should be cached. But I'm not sure that's where the problem is - cause it only happens the first time after a java install.
    Any clues?

    I think you're dynamicallt created jnlp is invalid in someway; I can use the following without any problems:
    <?php
    header("Content-type: application/x-java-jnlp-file");
    echo "<?xml version=\"1.0\" ?>\n";
    $codebase = trim(stripslashes(urldecode($_REQUEST["codebase"])));
    $href = trim(stripslashes(urldecode($_REQUEST["href"])));
    echo "<jnlp spec=\"1.0+\" codebase=\"$codebase\" href=\"$href\">\n";
    ?>
    </jnlp>
    you should try and test the output of your generated code, something like this should work:
    test.php
    <html>
    <body>
    <textarea rows=20 cols=70>
    <?php
    include 'mydynamicscript.php';
    ?>
    </textarea>
    </body>
    </html>
    The first time a jnlp is called it is downloaded into the browser cache and javaws.exe is executed on it from that location, this in turn downloads the jnlp again from the passed codebase & href attributes into the jws cache. Subsequent calls the jnlp are extracted from the copy in the webstart cache, and often downloaded from the codebase & href attributes when it detects possible changes. In your case these jnlp files seem to differ.
    - Richard

  • How do I disable iphoto from automatically launching when I plug in my iPhone?

    Trying to figure out how to disable iphoto from automatically launching on my Macbook Pro every time I plug in my iphone via USB cable. Tried looking at preferences in iphoto and itunes, but can't seem to find anything. Thanks!

    It is your preference in iphoto.
    Set it not to open when a digital camera is connected.

  • How can I disable iPhoto automatic launch?

    Hi,
    I do not use iPhoto to import my digital images. How can I disable the automatic launch when I plug my camera or card reader?
    Thanks!

    Hi Paul,
    To do this just open Image Capture, open its preferences and then under the general tab you can select the option of "When a camera is connected, open:"
    Just select no application and that should do it.
    Sam

  • How do I get my iPhone 5 to stop automatically launching Music when plugged into my car USB port?

    For quite some time, my iPhone has been set to automatically launch Music -- on the first song listed alphabetically -- as soon as I plug it into my car's USB port, which I use both for connectivity and for charging. It's enough to have made me hate a song I used to love: if I hear the opening riff of "The A Team" one more time I think I'll throw the phone out the window!! LOL Seriously: I've seen fixes for this in other posts, which apparently referred to older versions of iTunes, and required the "Stop AutoPlay" function to be initiated OUTSIDE the device, in iTunes on the synchronizing computer. That makes no sense to me. I've searched but cannot find a current fix. Am I eternally doomed to suffer this annoyance? Thanks!

    Disable any security software on the computer and try again.

  • IPhone 4 no longer automatically launches iTunes

    My iPhone 4 no longer automatically launches iTunes. In iTunes, the box is checked that says "Open iTunes when this iPhone is connected." I've checked and unchecked that box, restarted the computer, etc., but nothing I've done has fixed the problem. I've seen the solutions for the same problem in Windows, but not for a Mac. How can I fix this?

    Hi,
    I have the same problem and found the same solution (i.e. unchecking then "open iTunes when iPhone is connected", then rechecking it, re-installing iTunes Helper).
    The only problem is that this keeps happening over and over, and while I can certainly manage opening iTunes manually whenever I connect my phone, it bothers me that something is not working and I cannot figure out how to fix it.
    I noticed that when iTunes does not open automatically, you will see that iTunes Helper is not available in the System Preferences -> Users -> Login Items. The funny thing is that I am not even able to find it on my computer at all - until I re-install it through iTunes that is...
    Does anybody have an answer for this?
    Thanks,
    Jan

  • When I try and download photos from my camera, the system automatically launches Photo Viewer in Win 8.1.  This causes my Adobe Bridge to lock up.

    I recently bought a new computer with Win 8.1 installed.  When I installed CS6 64 bit, the installation went seamlessly.  My problem is that when I try and download images from my camera, it automatically launches the Windows Photo software to download the photos.  I would like to use the Bridge to do this for several reasons.  If I turn off the Windows Photo program, it takes me back to Bridge but when I click on Download Photos, it causes Bridge to lock up.
    If I click on download photos before I turn on my camera, it does not find the camera (as expected) but then I turn on the camera and reset list and Bridge finds the camera and I can download the photos.  Then if I try and download additional photos, Bridge locks up and I need to turn off the software and reboot the computer in order to get anything to download.
    I have gone to the System Settings and changed the AutoPlay settings to automatically select Bridge when I download Pictures...I also selected Bridge for the Memory Card.  Under Devices, my camera is listed and that is set to "Import Photos and Videos"
    Any suggestions?

    See my response to your other post.

  • When I reboot my mac it automatically launches disk utilities. i have run the utility. all clear. but each time i reboot i get the disk utility. how do i override so i can have my hard drive back?

    When I reboot my mac it automatically launches disk utilities. i have run the utility. all clear. but each time i reboot i get the disk utility. how do i override so i can have my hard drive back?

    What OSX version is it?
    Does holding alt key at bootup show any boot choices?
    Does holding Shift key at bootup to boot in Safe mode do the same thing?

  • Link Won't Automatically Launch Email Client

    We use an intranet application database for CRM (ColdFusion) via Safari (5.0.3). Our accounts include email addresses which, when selected, previously opened a New Message in the email client of user's choice (whether Mail or Entourage, etc.)
    Some employees using iPads and iPhones were noting that Mail was not automatically launching when they selected an email address (appears as a hyperlink in the database). I began to investigate, and the links are not working (automatically launching a New Mail Message in the email client) on one of our MacMinis (10.4.11) either. The links to a New Messsage are working on some of our Macs (some 10.4.11, some 10.6.6), but not all.
    In my playing around with settings, somehow I have made the links not work on my MacBook Pro (10.6.6)!
    Here is the copied link (with inserts for security):
    https://www.[site].com/secure/customer/log_email.cfm?id=481&mailto=[name]@[domain].org
    Again, this WAS working fine in Safari on my MacBook Pro, but it is not now. I should point out that the email links ARE working in Chrome BUT NOT FireFox or Safari.
    I have changed my default email client in Mail, back and forth, to see if this would make a difference, but it has not.
    The CRM provider has said they haven't changed anything on their end (and again, it is working for many of our Macs).
    Any suggestions or help would be appreciated.

    Hi,
    On the iPads and iPhones. Tap Settings / General / Reset / Reset All Settings. Then restart the devices.
    On the Mac for Safari. Try troubleshooting the Safari .plist file.
    Quit Safari (Command + Q) Open a Finder window. Select your Home Folder in the Sidebar on the left. It has a small house icon. Then open the Library folder then the Preferences folder. Move the com.apple.Safari.plist file from the Preferences folder to the Desktop.
    Relaunch Safari. See if made a difference. If not, try emptying the Safari cache from the Safari menu, Safari / Empty Cache or Command + Option + E.
    Since you have changed the default Mail client several times, you may need to delete the com.apple.mail.plist file also from the user account: ~/Library/Preferences
    Make sure to make note of all your Mail preferences first before delete that.plist file.
    Carolyn

  • App. automatically launches, but not listed in accounts/startup items

    I have a pesky application which automatically launches on start-up, yet it's not listed in accounts/startup items. It's called Microtek scanner finder. I seem to remember it started doing it when I originally got the scanner and installed software, and although it's always niggled I didn't mind when I was using the scanner. However, I'm not using the scanner anymore so want to be rid of it in my dock. Where the heck is it coming from? I don't want to chuck all the software as there may be an occasion where I need to scan a transparency, when I'll need to get the old scanner down from the loft... any ideas? It definitely launches as there is a little black triangle beneath the icon in the dock. If I quit it, it disappears but is back there again on another start-up grrrrr.

    Hi, Kathykate. I have a similar Epson Scanner Monitor application that starts up each time I restart my computer. (Mine does appear in Sys Prefs > Accounts > my account > Startup Items, so I could delete it from there if I wanted to.) It runs all the time in the background, using a tiny amount of CPU and memory, and it has no user interface at all: If I quit it, nothing visibly changes, and if I open it again, there's no visible sign that it's open (including no icon in the dock for it). Its only function is to detect my Epson Scanner when I plug it in and turn it on. I ignore it the rest of the time, because whether it's running or not has no impact whatsoever on anything I do. I suggest that you take the same attitude toward your Microtek app.

  • System Preferences is automatically launching

    My system preferences application is automatically launching. I don't see any consistent circumstances preceding the launces, but it happens a couple dozen times a day at least. Does anyone have any ideas? Thanks.

    Hi MacHappiest,
    The simplest approach to try first would be to go to /Users/~(yourHome)/Library/Preferences/com.apple.systempreferences.plist and drag it to the desktop. You may have to re-set some of your system preferences.
    -mj
    [email protected]

  • IPhoto automatically launches when I restart

    IPhoto 5.0.4 seems to automatically launch everytime I restart. There isn't anything in /Library/StartupItems/ for this to occur, nor is there anything in the iPhoto preferences. Has this happened to anyone else? I don't know how to make it quit doing that.

    Thanks Peter!
    That was the problem. Is that a new "feature" in Tiger? Also, I wonder why iPhoto got put in there in the first place.

  • TS1717 I cannot get iTunes to automatically launch at startup in Windows 7. I need it to do this so my Apple TV 'finds' my Music Library, which is stored on an external hard-drive, connected to my Windows 7 PC.

    I cannot get iTunes to automatically launch at startup in Windows 7. I need it to do this so my Apple TV 'finds' my Music Library, which is stored on an external hard-drive, connected to my Windows 7 PC. Anyone know how I do this? I cannot seem to find anything on Google, which is surprising.
    iTunes helper launches OK, but not iTunes itself. Am I being dim?
    Thanks

    The iTunes application should be installed on the system drive. You may need to repair iTunes to fix that error regarding a missing .exe.
    To organize your library properly see Make a split library portable.
    If you don't have a working version of the library that can be transformed into a portable shape I have tools and techniques that can repair the broken links.
    tt2

Maybe you are looking for

  • Need HELP to find Eclipse IDE with Oracle Portlet Factory.

    I want to start to develop oracle portlets without coding and I found that Oracle Portlet Factory is right technology for that. But I do not the best place to get info about installation of Oracle Portlet Factory based in Eclipse or somewhere else.

  • Set formula to ignore blank cells

    Hiya. Like Anim8me2 (good question about using formulas to assign letter grades to ranges of values), I am building a grade book for teaching. I really want to get away from my clunky and inelegant gradebook program and should be able to if I can sol

  • How to do the effects used in this video?

    Hi, I'm curious as to how to do these effects in this video: Childish Gambino Type Beat - Inhale Ft. Drake - YouTube Mainly I'm looking for the colors, but knowing how to do the scratches would be nice too. Any information is greatly appreciated

  • Should I remove the blue film on the battery of my brand new Pavilion 15 - n096sa laptop?

    Should I remove the blue film on the battery of my brand new Pavilion 15 - n096sa laptop?

  • Installation & Configurations Pre-requisites

    Hi all, from several posts regarding installations, I see that there are problems regarding pre-requistes. Apart from the certification matrix, which provides information on OS, database repository there are certain other mandatory requirements for i