JNLP saveFileDialog problem

Hi
I have a java web start application where I save a file for the user. I want to give a filename to show in the saveFileDialog editable textbox. My problem is that there is no suggessted filename in the editable textbox in the saveFileDialog. The application is running in a sandbox, no jar files is signed. Is this the problem? If this is the problem is there a way to get around this problem without signing the jars?
// out is my outputstream
String[] xtns = { "test1" , "test2" };
FileSaveService mFileSaveService = (FileSaveService) ServiceManager.lookup("javax.jnlp.FileSaveService");
mFileSaveService.saveFileDialog(null, xtns, out.getTarget(), "myFileName." + xtns[0]);/Thanks in advance
Tobbe

First of all, you have no href in your jnlp element.
Are you absolutely sure there's nothing wrong with JnlpExtension.jsp?
Other guesses (anyhow related) are:
1) It may be something about name length (too long, parameters are part of the url)
2) The jsp is setting a different href URL within (parameters are part of the url, once again) and this can often result in some kind of trouble
I'd suggest validating your jnlp with janela (sw by AndrewThompson64). Download it and have it run in your network so that it can actually download every resource and make a deeper analisys.
Bye.

Similar Messages

  • JNLP Deployment Problem

    I need to deploy a JavaFX Applet on a Mac running 1.6.0_33. But so far, I've been unable to do this successfully. Here's what I've tried:
    1. I generated a JNLP file and using the generated html page, tried to view the applet. Unfortunately, the dtjava script indicated that I didn't have the correct setup. I was hoping that it would simply download the jfxrt.jar with the appropriate native libraries from Oracle's site, but that didn't happen.
    2. I modified the JNLP to serve up an application instead of an applet, and tried accessing the JNLP directly instead of through the web page.
    2. I tried serving up the jfxrt.jar and the native libraries separately using an os-specific resources tag in jnlp -- one jar for the native libs, and keep the original jfxrt.jar (that didn't work -- "java.lang.UnsatisfiedLinkError. Unable to load NativeLibLoader")
    3. I tried updating jfxrt.jar with the native libraries (that didn't work -- same error message).
    4. I tried copying the new jfxrt.jar file into *$JAVA_HOME/lib* (and not serving the jar file), but it couldn't find javafx.application.Application
    5. I tried changing the extended file attributes (there's an attribute com.apple.quarantined) that's associated with the files and I thought that this might be preventing the jfxrt.jar from being accessed. But that didn't work either -- same error.
    6. I've tried adding a javafx.runtime.path property to the j2se entry in the JNLP -- same error.
    So my question is, how did people deploy JavaFX apps via webstart before Java 7 when the JRE did not include the the javafx runtime jars and libraries? Is there some other location that I should place the jfxrt.jar?

    In answer to your earlier comment about letting you know how well switching from applet to application works.
    The application "launches" but doesn't startup. The application name appears next to the Apple menu, and it looks like it's trying to startup, but doesn't get any further. The thread dump shows that its executing the call to the Application.launch() method and then sits there.
    at sun.misc.Unsafe.park(Native Method)
         - parking to wait for  <7f3711c38> (a java.util.concurrent.CountDownLatch$Sync)
         at java.util.concurrent.locks.LockSupport.park(LockSupport.java:156)
         at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:811)
         at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:969)
         at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1281)
         at java.util.concurrent.CountDownLatch.await(CountDownLatch.java:207)
         at com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:134)
         at com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:75)
         at javafx.application.Application.launch(Application.java:209)I'm using maven to build the jar and apparently there's some undocumented "magic" that goes on if you use the javafxpackager. I noticed that a com.javafx.main.Main class is inserted into the jar if I use the packager, and some additional attributes are added to the jar. It might be good at some point to document some of the magic. Especially the stuff that dtjava.js does to the jfx:? tags in order to turn the jnlp into something that is launchable.
    What's odd is that I can run the application from Eclipse without any problem.

  • Debugging JNLP security problems

    As we all know, the latest Java update changed the JNLP security around a bit, and I, like many others, am having trouble with it.
    I'm not really here to ask for help with my specific problem, however. It's not the first time I've had trouble with JNLP security, and almost every time, I've only gotten around it with the help of mere guess-work and a fair bit of luck, and I'm still far from sure I've actually solved the problems correctly. The main problem I experience is that the security messages I get from the JNLP client are oriented towards end-users and thus not very helpful at all for tracking down the root cause of the issues. For instance, after this latest update, the JNLP client is just telling me that "The Java security settings have prevented this application from running. You may change this behavior in the Java Control Panel."
    Is there any good way to find out what security problems it is that I'm actually having? "Read the documentation" is of course the easy answer, but the security model seems rather complex and incorporates many parts. Is there some kind of "lint" tool for JNLP out there that can list the problems I'm having? Or is there some way to run the JNLP client in some kind of debug mode?

    Understood guys. But let me make a few points.
    1. Clearly I'm not the only one who had this problem. In fact, I wasn't the first person in this THREAD to have the problem.
    2. I'm fairly computer savvy, and have worked with Photoshop for several years.
    3. Yes, it does say c: in point 3, but I find it odd that in point 4 it does say Program Files/.... A very strange way to write it. Also, the c: drive is the default installation drive, so it's not idiocy for someone to assume that the file would be located on the same drive as you selected for installation.
    4. This is not about technically right or wrong. I never said that the instructions were wrong. I merely was trying to make a suggestion that would help people avoid the same trap I fell into. Was it my mistake? Yes. Would my clarifying suggestion perhaps help others avoid making the mistake I did. I would hope so. Also, as someone else suggested in this thread, Adobe SHOULD have written an installation program for the ACR 3.1 upgrade that did the placing automatically. After all, EVERYONE knew that ACR3.1 would be released shortly after the release for CS2...in fact Mr. Knoll himself was quoted in other forums about when D2X compatibility would actually happen.
    5. The purpose of these forums is to be helpful to other users--not to be patronizing or rude. I'm a big Photoshop fan, and a loyal customer. I'm also in the service industry, and I would bet that customer service experts would raise an eyebrow or two about the tone contained in certain messages in this thread, including from an Adobe employee.
    Just my two cents. Flame away if you must. But you might want to take a look at what I actually suggested in my last message before lighting up the torch.

  • JNLP extension problem

    Hi,
    I have developed application which execute using java web start.
    I work fine on Client JRE 1.6, but gives following exception Clinet JRE 1.5
    Exception in thread "javawsApplicationMain" java.lang.NoClassDefFoundError: com/vistaar/framework/exceptions/UserException
         at java.lang.Class.getDeclaredMethods0(Native Method)
         at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
         at java.lang.Class.getMethod0(Unknown Source)
         at java.lang.Class.getMethod(Unknown Source)
         at com.sun.javaws.Launcher.executeApplication(Unknown Source)
         at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
         at com.sun.javaws.Launcher.continueLaunch(Unknown Source)
         at com.sun.javaws.Launcher.handleApplicationDesc(Unknown Source)
         at com.sun.javaws.Launcher.handleLaunchFile(Unknown Source)
         at com.sun.javaws.Launcher.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Also,
    I have used "extension" tag in jnlp file.
    When i remove extension tag and keep only "jar" tag, in that case it works fine for Client JRE 1.5
    as well,
    so the problem is something with Client JRE 1.5 & JNLP extension tag.
    does any one have idea, about such problems?
    following is my jnlp file (with extension tag)
    <jnlp spec="1.0+" codebase="http://10.65.18.20/Vistaar/">
    <information>
    <title>Suraj Hajare</title>
    <vendor>Suraj Hajare.</vendor>
    <homepage href="http://10.65.18.20/Vistaar/null"/>
    <description>Suraj Hajare</description>
    </information>
    <security>
    <all-permissions/>
    </security>
    <update check="timeout" policy="always"/>
    <resources>
    <java initial-heap-size="67108864" max-heap-size="134217728" href="http://java.sun.com/products/autodl/j2se" version="1.5+"/>
    <jar href="http://10.65.18.20/Vistaar/view/html/archive/view.jar" download="eager" main="false"/>
    <extension href="http://10.65.18.20/Vistaar/jnlp/JnlpExtension.jsp?jarfilename=view/html/archive/excel.jar&codebase=http://10.65.18.20/Vistaar&title=VistaarMainApplet&vendor=Vistaar&permissions=all-permissions"/>
    <extension href="http://10.65.18.20/Vistaar/jnlp/JnlpExtension.jsp?jarfilename=view/html/archive/images.jar&codebase=http://10.65.18.20/Vistaar&title=VistaarMainApplet&vendor=Vistaar&permissions=all-permissions"/>
    <extension href="http://10.65.18.20/Vistaar/jnlp/JnlpExtension.jsp?jarfilename=view/html/archive/izmcomjni.jar&codebase=http://10.65.18.20/Vistaar&title=VistaarMainApplet&vendor=Vistaar&permissions=all-permissions"/>
    <extension href="http://10.65.18.20/Vistaar/jnlp/JnlpExtension.jsp?jarfilename=view/html/archive/jfrm_UI.jar&codebase=http://10.65.18.20/Vistaar&title=VistaarMainApplet&vendor=Vistaar&permissions=all-permissions"/>
    <extension href="http://10.65.18.20/Vistaar/jnlp/JnlpExtension.jsp?jarfilename=view/html/archive/plugin.jar&codebase=http://10.65.18.20/Vistaar&title=VistaarMainApplet&vendor=Vistaar&permissions=all-permissions"/>
    <extension href="http://10.65.18.20/Vistaar/jnlp/JnlpExtension.jsp?jarfilename=view/html/archive/log4j-1.2.13.jar&codebase=http://10.65.18.20/Vistaar&title=VistaarMainApplet&vendor=Vistaar&permissions=all-permissions"/>
    <extension href="http://10.65.18.20/Vistaar/jnlp/JnlpExtension.jsp?jarfilename=view/html/archive/izmcom.jar&codebase=http://10.65.18.20/Vistaar&title=VistaarMainApplet&vendor=Vistaar&permissions=all-permissions"/>
    <extension href="http://10.65.18.20/Vistaar/jnlp/JnlpExtension.jsp?jarfilename=view/html/archive/excel_extn.jar&codebase=http://10.65.18.20/Vistaar&title=VistaarMainApplet&vendor=Vistaar&permissions=all-permissions"/>
    </resources>
    <application-desc main-class="com.vistaar.clemenza.ui.framework.workspace.StandaloneExcelApplet">
    <argument>dimbarChoice=Icon</argument>
    <argument>excelFile=Book2</argument>
    <argument>codeBase=http://10.65.18.20/Vistaar</argument>
    <argument>serverVistaarCabVersion=3,6,6,10000</argument>
    </application-desc>
    </jnlp>

    First of all, you have no href in your jnlp element.
    Are you absolutely sure there's nothing wrong with JnlpExtension.jsp?
    Other guesses (anyhow related) are:
    1) It may be something about name length (too long, parameters are part of the url)
    2) The jsp is setting a different href URL within (parameters are part of the url, once again) and this can often result in some kind of trouble
    I'd suggest validating your jnlp with janela (sw by AndrewThompson64). Download it and have it run in your network so that it can actually download every resource and make a deeper analisys.
    Bye.

  • JNLP version problem

    Hi,
    I've added a version id for each resource in my JNLP file
    <jar href="/MinFinCtx/WSTest/jars/ctx.be.jar" version="1"/>
    <jar href="/MinFinCtx/WSTest/jars/ctx.com.jar" version="1"/>
    When I try to lauch my application I receive the following error message :
    Missing version field in response from server when accessing resource: (http://158.67.39.160/MinFinCtx/WSTest/jars/ctx.be.jar, 1)
    Is there something else that I have to do before I can use version numbers ?
    I use WebStart version 1.0.1
    Thanx,
    Piet

    In order to use the version protocol, you need to be running the jnlpDownloadServlet,, or similar servlet, jsp page, or script on the host that implemented the "version-based" protocol defined in the jnlp-specification.
    see: developers guide: http://java.sun.com/j2se/1.4.2/docs/guide/jws/developersguide/contents.html
    /Dietz

  • Dynamic JNLP file problem

    Okay this topic can be deleted, I'm not sure how to do it myself.
    The problem wasn't Java related at all.
    Thanks.
    Edited by: Cluber on Sep 12, 2011 5:15 PM

    Okay this topic can be deleted, I'm not sure how to do it myself.
    The problem wasn't Java related at all.
    Thanks.
    Edited by: Cluber on Sep 12, 2011 5:15 PM

  • Jnlp file problems

    I created a jnlp file which loads fine when I load it from an html page located on my computer. However, when I send this page into a webserver the file does not load up the application and instead loads as if it was a xml file in Internet Explorer.
    What's wrong??? I've been scratching at this for a while now.... :(
    Thanks,

    If your host uses the Apache webserver, you might be able to add the correct mime-type by placing a file called .htaccess file in the folder with the jnlp file(s) with the following content:AddType application/x-java-jnlp-file jnlp

  • JNLP application problems!

    Morning
    Right!
    I have a JNLP:
    <?xml version="1.0" encoding="UTF-8"?>
    <jnlp codebase=http://jes400/GroupIngredientCode
    href="GroupIngredientCode.jnlp">
    <information>
    <title>GroupIngredientCode Launching Test</title>
    <vendor>FMO</vendor>
    <description>Demonstration of JNLP</description>
    <offline-allowed/>
    </information>
    <resources>
    <j2se version="1.6" />
    <jar href="GroupIngredientCode.jar"/>
    <jar href="jt400.jar"/>
    <jar href="msbase.jar"/>
    <jar href="mssqlserver.jar"/>
    <jar href="msutil.jar"/>
    <jar href="mail.jar"/>
    <jar href="activation.jar"/>
    </resources>
    <application-desc main-class="GroupIngredientCode" />
    </jnlp>
    but when the application runs it is not displaying the JTable as it should, it is tiny and you can not read what is in it. Also it does not appear to be writing to the tables i have on the AS400.
    if i run this as a normal application it works fine it is just when i launch it throught the JNLP file it does not!
    Any ideas anyone!!!

    You should post your question on the Java Web Start & JNLP forum:
    http://forum.java.sun.com/forum.jspa?forumID=38

  • JavaFx + JNLP + JVMTI problem

    Hi, everyone!
    I wrote a program using JavaFx 2.2, and encrypted it using JVMTI.Now I can successfully run it on my local machine, like:
    javaws -J-agentlib:JvmAgent Test.jnlp
    But when I load a remote jnlp,like:
    javaws -J-agentlib:JvmAgent http://x.x.x.x:xx/Test.jnlp
    It failed with a "java.lang.ClassFormatError: Incompatible magic value" error. It seems that the JvmAgent is not correctly loaded.
    How Should I do?

    Follow troubleshoting advise to get detailed trace logs:
    http://docs.oracle.com/javase/7/docs/webnotes/tsg/TSG-Desktop/html/plugin.html
    Also, compare how process command line looks for result java process (for case it works and it does not work).
    From the error message it looks like different versions of JVM are used but this is just a guess.

  • Problem in launching webstart application when using version atribute

    Hello Experts,
    I am trying out my first example of JNLP. This is my JNLP file.
    <?xml version="1.0" encoding="UTF-8"?>
    <jnlp spec="1.0+" codebase="http://localhost:8092/webApplForWebStart" href="launch.jnlp">
        <information>
            <title>ForWebStart2</title>
            <vendor>NAgrawal</vendor>
            <description>ForWebStart2</description>
            <description kind="short">ForWebStart2</description>
            <homepage href=""/>
            <offline-allowed/>
            <shortcut online="true">
              <!-- create desktop shortcut -->
              <desktop/>
              <menu submenu="WebStart Trial"/>
         </shortcut>
        </information>
        <security>
            <all-permissions/>
        </security>
        <resources>
            <j2se version="1.5+"/>
            <jar href="JNLPTime.jar" version="1.0" main="true" download="eager"/>
        </resources>
        <application-desc main-class="TheTime">
        </application-desc>
    </jnlp>My Problem is if I remove version="1.0" from <jar > tag application is launching properly. But if I am using version attribute , it is giving me this error while launching the application.
    "Unable to load resource :( http://localhost:8092/webApplForWebStart/JNLPTime.jar , 1.0)
    java.io.IOException : missing version response from server."
    I can't afford to remove the version attribute as it is required for auto-update. Has anyone ever tried faced such problem.? Please help me. Any help is highly appreciated.Thanks in advance.

    It's just as told.
    If you're using explicit versions, the server response MUST provide an header to tell which version is returned (you could be using 'wildcards' like 1+).
    How are you serving requests? Are you using JnlpDownloadServlet? If so, check docs: extra work is required in order to use version features.
    If using your own service google for header (and parameter) name, use exact versions and copy to the response the value you're retrieving from the request.
    Bye.

  • How To Access a jar file present outside the war file through a jnlp

    Aoa
    I m new to this forum
    I m having problem with my jnlp file
    i want to know is there any way to access a jar file through jnlp.The problem is that my jnlp file is present in the war file
    and i want to know how to acess a jar file through this jnlp.The scenerio is as below
    I m using ear file on jboss.Its hirerchy is as
    -PAN-war.war
    -launch.jnlp
    -PAN-app-client.jar
    my jnlp file is as follows:
    <?xml version="1.0" encoding="UTF-8"?>
    <jnlp spec="1.0+" codebase="http://localhost:8080/" href="PAN/launch.jnlp">
    <information>
    <title>PanEmirates</title>
    <vendor>M Fazal Ur Rehman</vendor>
    <description>PanEmirates</description>
    <description kind="short">PanEmirates</description>
    <homepage href=""/>
    </information>
    <security>
    <all-permissions/>
    </security>
    <resources>
    <j2se version="1.5+"/>
    <jar href="PAN-app-client.jar" download="eager"/>
    <jar href="lib/javafxrt.jar" main="true" download="eager" />
    <jar href="lib/Filters.jar" download="eager"/>
    <jar href="lib/javafx-netbeans-fxuserlib.jar" download="eager"/>
    <jar href="lib/swing-layout-1.0.3.jar" download="eager"/>
    </resources>
    <application-desc main-class="net.java.javafx.FXShell">
    <argument>pan.Main</argument>
    </application-desc>
    </jnlp>
    when i run launch.jnlp file it says unable to download resource http://localhost:8080/PAN/PAN-app-client.jar
    how to access this jar file
    Any help or comment would be highly appreciated
    Regards
    M Fazal Ur Rehman

    Excellent question. I don't see any client-jar in your EAR file structure. So I am assuming you are writing a separate client application which will talk to the ejbs deployed as part of this EAR. You need to do the following:
    Write another EAR file with the following structure:
    ear:
    META-INF/application.xml
    util.jar
    client.jar
    client.jar should have a META-INF/MANIFEST.MF and that should contain Class-Path:util.jar and value for Main-Class attribute.
    Now deploy this new ear to your application server and execute it using Application Client Container that comes with your app server.
    If you don't want to write another EAR file, then bundle th client.jar in your original EAR file.
    Points to note are:
    you have to repackage util.jar again inside this ear file.
    For portability reason, you should use Class-Path manifest entry in client.jar. Refer to http://java.sun.com/j2ee/verified/packaging.html and J2EE platform spec section #8.2.
    Hope this helps,
    Sahoo

  • Problems with passing arguments to app

    Hi.
    I have a litle problem with passing arguments. I create a dynamic jnlp file using jsp. This is my code:
    <%
    response.setContentType("application/x-java-jnlp-file");
    String l = request.getParameter("login");
    String p = request.getParameter("pass");
    out.println("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
    out.println("<jnlp spec=\"1.0+\" codebase=\"http://212.244.104.27:8080/PzP_INSTALL/\" href=\"pzp.jsp\">");
    out.println("<information>");
    out.println("<title>xxx</title>");
    out.println("<vendor>xxxx</vendor>");
    out.println("<homepage href=\"main.jsp\"/>");
    out.println("<description>text</description>");
    out.println("<offline-allowed/>");
    out.println("</information>");
    out.println("<security>");
    out.println("<all-permissions/>");
    out.println("</security>");
    out.println("<resources>");
    out.println("<j2se version=\"1.4+\"/>");
    out.println("<jar href=\"jars/pzp.jar\" main=\"true\" download=\"eager\"/>");
    out.println("<jar href=\"jars/config.jar\" main=\"false\" download=\"eager\"/>");
    out.println("<jar href=\"jars/commons-beanutils.jar\" main=\"false\" download=\"eager\"/>");
    out.println("<jar href=\"jars/commons-collections.jar\" main=\"false\" download=\"eager\"/>");
    out.println("<jar href=\"jars/commons-digester.jar\" main=\"false\" download=\"eager\"/>");
    out.println("<jar href=\"jars/commons-logging.jar\" main=\"false\" download=\"eager\"/>");
    out.println("<jar href=\"jars/commons-validator.jar\" main=\"false\" download=\"eager\"/>");
    out.println("<jar href=\"jars/easclient.jar\" main=\"false\" download=\"eager\"/>");
    out.println("<jar href=\"jars/easj2ee.jar\" main=\"false\" download=\"eager\"/>");
    out.println("<jar href=\"jars/jakarta-oro-2.0.7.jar\" main=\"false\" download=\"eager\"/>");
    out.println("<jar href=\"jars/jbcl.jar\" main=\"false\" download=\"eager\"/>");
    out.println("<jar href=\"jars/log4j-1.2.7.jar\" main=\"false\" download=\"eager\"/>");
    out.println("<jar href=\"jars/jdom.jar\" main=\"false\" download=\"eager\"/>");
    out.println("<jar href=\"jars/xercesImpl.jar\" main=\"false\" download=\"eager\"/>");
    out.println("<property name =\"javaws.login \"  " + "value=" + "\"" + l + "\"" + "/>");
    out.println("<property name =\"javaws.pass \"  " + "value=" + "\"" + p + "\"" + "/>");
    out.println("</resources>");
    out.println("<application-desc main-class=\"aaa.bbb.ccc.MyClass\"/>");
    out.println("</jnlp>");
    %>My problem is when i have the href tag filled, the arguments that i passed equlas null, when i remove the href everything is ok besides that the app doesnt show in application manager and doesnt create an icon on the desktop.
    out.println("<jnlp spec=\"1.0+\" codebase=\"http://62.89.104.27:8080/PzP_INSTALL/\" href=\"pzp.jsp\">");
    Any help would be appreciated.

    Hello again.
    Thanks for your replay but unfortunetly it doesnt work too :-(
    I've tried to use the out.println statemants in the servlet instead of using a jsp page but the error is the same. Please look at my code and tell me if you can what could be wrong.
    This is the error message:
    An error occurred while launching/running the application.
    Title: PZP
    Vendor: SPEED
    Category: Download Error
    Unable to load resource: http://212.89.104.27:8080/PzP_INSTALL/ServletPZP
    Servlet code.
    package pzp_install;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    import java.util.*;
    import pzp_install.LoginBean;
    import javax.swing.JOptionPane;
    public class ServletPZP extends HttpServlet {
      public void init(ServletConfig config) throws ServletException {
      super.init(config);
      config.getServletContext().setAttribute("ServletPZP", this);
      public void doPost(HttpServletRequest request, HttpServletResponse resp)
      throws IOException {
      PrintWriter out = resp.getWriter();
    // Get the value of the request parameter
      String login = request.getParameter("login");
      String pass = request.getParameter("pass");
    resp.setContentType("application/x-java-jnlp-file");
    out.println("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
    out.println("<jnlp spec=\"1.0+\" codebase=\"http://212.89.104.27:8080/PzP_INSTALL/\" href=\"/servletpzp\">");
    out.println("<information>");
    out.println("<title>PZP</title>");
    out.println("<vendor>SPEED</vendor>");
    out.println("<homepage href=\"main.jsp\"/>");
    out.println("<description>Aplikacja wspomagajaca zarzadzanie zleceniami</description>");
    out.println("<offline-allowed/>");
    out.println("</information>");
    out.println("<security>");
    out.println("<all-permissions/>");
    out.println("</security>");
    out.println("<resources>");
    out.println("<j2se version=\"1.4+\"/>");
    out.println("<jar href=\"pzp.jar\" main=\"true\" download=\"eager\"/>");
    out.println("<jar href=\"config.jar\" main=\"false\" download=\"eager\"/>");
    out.println("<jar href=\"commons-beanutils.jar\" main=\"false\" download=\"eager\"/>");
    out.println("<jar href=\"commons-collections.jar\" main=\"false\" download=\"eager\"/>");
    out.println("<jar href=\"commons-digester.jar\" main=\"false\" download=\"eager\"/>");
    out.println("<jar href=\"commons-logging.jar\" main=\"false\" download=\"eager\"/>");
    out.println("<jar href=\"commons-validator.jar\" main=\"false\" download=\"eager\"/>");
    out.println("<jar href=\"easclient.jar\" main=\"false\" download=\"eager\"/>");
    out.println("<jar href=\"easj2ee.jar\" main=\"false\" download=\"eager\"/>");
    out.println("<jar href=\"jakarta-oro-2.0.7.jar\" main=\"false\" download=\"eager\"/>");
    out.println("<jar href=\"jbcl.jar\" main=\"false\" download=\"eager\"/>");
    out.println("<jar href=\"log4j-1.2.7.jar\" main=\"false\" download=\"eager\"/>");
    out.println("<jar href=\"jdom.jar\" main=\"false\" download=\"eager\"/>");
    out.println("<jar href=\"xercesImpl.jar\" main=\"false\" download=\"eager\"/>");
    out.println("<property name =\"javaws.login \"  " + "value=" + "\"" + login + "\"" + "/>");
    out.println("<property name =\"javaws.pass \"  " + "value=" + "\"" + pass + "\"" + "/>");
    out.println("</resources>");
    out.println("<application-desc main-class=\"pl.speednet.pzp.PzP\"/>");
    out.println("</jnlp>");
      public void destroy() {
      super.destroy();
    This is the brief of code which starts the servlet
    <form action="http://212.89.104.27:8080/PzP_INSTALL/servletpzp" method="post">
      <input type="hide" name="login" value=<%=l%>>
      <input type="hide" name="pass" value=<%=p%>>
      <input type=submit value=Start PZP>
    </form>
    This is the web.xml file code.
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>
      <servlet>
        <servlet-name>ServletPZP</servlet-name>
        <servlet-class>pzp_install.ServletPZP</servlet-class>
      </servlet>
      <servlet-mapping>
        <servlet-name>ServletPZP</servlet-name>
        <url-pattern>/servletpzp</url-pattern>
      </servlet-mapping>
      <mime-mapping>
        <extension>jar</extension>
        <mime-type>application/x-java-archive</mime-type>
      </mime-mapping>
      <mime-mapping>
        <extension>jnlp</extension>
        <mime-type>application/x-java-jnlp-file</mime-type>
      </mime-mapping>
    </web-app>

  • Cached jnlp parameters

    I have a dynamically generated jnlp file using a jsp that passes parameters set in the servlet context. Unfortunately, once the application is run, the parameters can never be updated and the application continues to use the old cached version. The jsp produces the correct file, but Web Start doesn't use it. Anyone have any ideas? Thanks.
    <%@ page
    contentType = "application/x-java-jnlp-file"
    %>
    <%
    response.setHeader("Expires", "0"); //Doesn't work
    String url = request.getRequestURL().toString();
    int index = url.lastIndexOf("/");
    if (index>0){
    url = url.substring(0,index);
    String helpURL = application.getInitParameter("HelpURL");
    if (helpURL == null){
    helpURL = "http://localhost";
    %>
    <?xml version="1.0" encoding="UTF-8"?>
    <jnlp spec="1.0+" codebase="<%=url%>" href="test.jsp">
    <information>
    <title>Test</title>
    <vendor>Test</vendor>
    <homepage href="index.html" />
    <description>Test Parameter App</description>
    <icon href="images/app.gif"/>
    <icon kind="splash" href="images/logo.gif"/>
    </information>
    <security>
    <all-permissions/>
    </security>
    <resources>
    <j2se version="1.4+"/>
    <jar href="test.jar" />
    </resources>
    <application-desc main-class="com.test.Test">
    <argument><%=helpURL%></argument>
    </application-desc>
    </jnlp>

    I am having the same jnlp cache problems and would appreciate if someone can post a solution to this.
    I use jsp to generate a value for a variable and I pass this variable to the application via the "property name".
    tag. Problem is, JavaWebStart will always use the cached jnlp even when the variable's value changes.
    Thanks for any help you can provide.
    [email protected]

  • JNLP installer - cached vs. non-cached resources

    Hello,
    I am currently trying to provide an installation procedure for some application. The application is in java and made of multiple jars and plugins. One constrain is that the application can launch java commands on the plugins (requiring access to jar files). Hence, I prepared an installer/updater to work with jnlp so as to install the application on the user computer. Each time the application is launched, we need to check for plugin updates and download the updates to the adequate directory before actually launching the application (via a ProcessBuilder), meaning the installer needs to be called each time the app is launched.
    I went as far as I could but get stuck on some (possibly core) concepts: I have 2 jnlp files, one being the installer, referencing the base jar resources and a jnlp plugin resource being a component.
    Through jnlp api, the installer is able to get cached resources and copy them to a given directory for the app to be launched. The main issue concerns the resources to be upgraded. Whenever new resources are present, the app do not get to see them as jnlp download them an put them in the cached resources before my installer can be launched. I thought I could use a DownloadServiceListener to get a hold on new resources, adding it as a progress-class parameter, but the service is apparently never called.
    If the resources are set to lazy, they never get to be available in either cached or available resources for upgrade...
    Here are reduced versions of the resources :
    installer :
    <?xml version="1.0" encoding="UTF-8"?>
    <jnlp spec="6.0+" codebase="%CODEBASE%/apps/" href="">
         <information>
              <offline-allowed />
              <shortcut online="true">
                   <desktop />
                   <menu submenu="Company">
                        <menu submenu="App" />
                   </menu>
              </shortcut>
         </information>
         <security>
              <all-permissions />
         </security>
         <update check="always" policy="always" />
         <resources>
              <j2se version="1.6+" java-vm-args="" href="http://java.sun.com/products/autodl/j2se" />
              <jar href="jnlp-installer.jar" main="true" />
              <extension name="applicationResources" href="%CODEBASE%/JNLP?jnlp=resources" download="eager"/>
         </resources>
         <application-desc main-class="com.company.JnlpInstaller" name="App name" >
         </application-desc >
    </jnlp>
    plugins :
    <?xml version="1.0" encoding="UTF-8"?>
    <jnlp spec="6.0+" codebase="%CODEBASE%" href="">
         <information>
              <offline-allowed />
         </information>
         <security>
              <all-permissions />
         </security>
         <update check="always" policy="always" />
         <resources>
              <j2se version="1.6+" java-vm-args="-d32" href="http://java.sun.com/products/autodl/j2se" />
              <jar href="../jnlp-installer.jar" />
              %RESOURCES%
         </resources>
         <component-desc progress-class="com.company.CustomDownloadServiceListener"/>
    </jnlp>
    Thanks in advance for your returns

    I am having the same jnlp cache problems and would appreciate if someone can post a solution to this.
    I use jsp to generate a value for a variable and I pass this variable to the application via the "property name".
    tag. Problem is, JavaWebStart will always use the cached jnlp even when the variable's value changes.
    Thanks for any help you can provide.
    [email protected]

  • Java web start fails to launch application when java cache is off

    Hi,
    there's no problem when java cache is used but when java cache isn't used, my application fails to launch via jws (jnlp).
    the following is the error
    java.lang.NullPointerException
    at java.util.jar.JarVerifier.mapSignersToCodeSource(Unknown Source)
    at java.util.jar.JarVerifier.mapSignersToCodeSources(Unknown Source)
    at java.util.jar.JarVerifier.getCodeSources(Unknown Source)
    at java.util.jar.JarFile.getCodeSources(Unknown Source)
    at java.util.jar.JavaUtilJarAccessImpl.getCodeSources(Unknown Source)
    at com.sun.deploy.cache.DeployCacheJarAccessImpl.getCodeSources(Unknown Source)
    at com.sun.javaws.security.SigningInfo.getCommonCodeSignersForJar(Unknown Source)
    at com.sun.javaws.security.SigningInfo.check(Unknown Source)
    at com.sun.javaws.LaunchDownload.checkSignedResourcesHelper(Unknown Source)
    at com.sun.javaws.LaunchDownload.checkSignedResources(Unknown Source)
    at com.sun.javaws.Launcher.prepareResources(Unknown Source)
    at com.sun.javaws.Launcher.prepareAllResources(Unknown Source)
    at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)
    at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)
    at com.sun.javaws.Launcher.launch(Unknown Source)
    at com.sun.javaws.Main.launchApp(Unknown Source)
    at com.sun.javaws.Main.continueInSecureThread(Unknown Source)
    at com.sun.javaws.Main$1.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    this is the jnlp file
    <?xml version="1.0" encoding="UTF-8"?>
    <jnlp spec="1.0+" version="1.0" codebase="http://11.4.100.41" href="secuiNXG.jnlp">
    <information>
    <title>secuiNXG U start GUI</title>
    <vendor>secui.com Ltd.</vendor>
    <homepage href="/"/>
    <icon href="web_login_ci.gif"/>
    <shortcut online="true">
    <desktop/>
    <menu submenu="secuiNXG U"/>
    </shortcut>
    </information>
    <security>
    <all-permissions/>
    </security>
    <resources>
    <j2se version="1.4+" initial-heap-size="50m" max-heap-size="250m" />
    <jar href="SES.jar"/>
    <jar href="skin_alloy.jar"/>
    <jar href="Borders.jar"/>
    <jar href="informa.jar"/>
    <jar href="jaxen-1.1-beta-12.jar"/>
    <jar href="jcelements.jar"/>
    <jar href="jctable.jar"/>
    <jar href="jdom.jar"/>
    <jar href="log4j-1.2.14.jar"/>
    <jar href="jnlp.jar"/>
    <jar href="jxl.jar"/>
    </resources>
    <application-desc main-class="secui.firewall.SecuiLogin">
    <argument>11.4.100.41:80</argument>
    </application-desc>
    </jnlp>Test Environment
    JRE : 1.6.0_19
    O/S : Windows 7 (32 bit)
    Browser : IE8
    I checked for other versions of jre but not using java cache didn't cause any problems.
    I checked for the release note of update 19 but I have no clue.
    Is there any way to launch java application without using java cache?

    greencosmos wrote:
    ..I had a problem changing the cache location. The button for this action is disabled. I can't figure out how to enable it.On my system, it is enabled when the 'cache files' box is checked, and disabled when it isn't.
    1) Without changing the location I assumed that deleting the cached files could be a similar job, so I clicked "Delete Files..." and deleted with all checkboxes checked.I am not convinced that would entirely clear the cache, but have done no specific tests to check.
    2) I unchecked "Keep temporary files on my computer".So it was checked when you were trying to change the cache location?
    3) Applied all the changes.
    4) I launched your demo.
    Result - It was launched without any prompt.
    I revisited the page with the URL and successfully launched the app. again.The application launched just fine, but no prompt.
    If you follow those (links and) steps I outlined exactly, does the file service demo launch twice for you?I'm sorry I don't exactly understand your question. .. Your description is enough to convince me that answer is 'yes'.
    ..I tried twice and it launched twice, but not twice at the same time(it launched once at a time).Surprise, surprise. That is the first mention in this thread of 'same time'/'simultaneously'. Care to share the other defining factors that you forgot to mention, or is guessing part of the 'fun' of helping?
    But still I'm having problems with launching my application.
    I assume that it could be jnlp syntax problem. The "main=true" subelement is missing.It is a good idea to validate the launch files of JWS based launches that are failing for any reason. For that purpose, I offer JaNeLA.
    Having said that, a missing main='true' will not be detected by JaNeLA, since it is not a compulsory attribute. ..But check them anyway.

Maybe you are looking for