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

Similar Messages

  • Jnlpdownloadservlet and dynamic jnlp file

    Problem: we want the version handling (+ jardiff) of JnlpDownLoadServlet, but we also need to construct the jnlp file dynamically (for example: a .jsp file). It seems to me there are two solutions, neither of them good: a) hack the JnlpDownloadServlet (or roll our own), intercepting the jnlp-file-reading code to forward to the jsp page that generates the jnlp xml data and use the generated response as the file contents.
    b) generate each jnlp file dynamically and then store it in a temporary location for the JnlpDownloadServlet to pick up. This entails aging the temporary jnlp files and deleting them so the server doesn't get clogged with dead jnlp files.
    Is there a third possibility? Or something in the pipe for the near future?
    (Note: Web Start Services is not a solution for this task since WSS doesn't support jar versioning, and since the $$properties mechanism does not appear to be ideal for passing a lot of dynamic jnlp information.)
    Thanks in advance for any advice.

    My jsp page actually generates the list of jars for the application. It also passes some info specific to the user session by means of the jnlp file. Since we are doing games, the list of applications keeps growing. By generating the resource elements dynamically for a game, we can reduce maintenance (as opposed to having a large number of jnlp files with mostly duplicate code) -- especially when a version is updated.
    Till we can move to 1.5, I plan to use the temporary file creation method.
    Thanks, --John                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Dynamic JNLP files?

    I have a number of small, embedded devices running a Cherokee web server, each with their own IP address and hostname. Each of these devices has a standard image that includes a few applets. Is there a way to make a standard JNLP file that could go in the image but would still work? My concern is that the codebase is going to be different for device...

    A way to generate dynamic JNLP's is by using a servlet.
    The servlet path is the JNLP target for the client, and the servlet itself outputs the JNLP contents with the JNLP content-type.
    Jacco

  • 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

  • Download .jnlp file when first time

    Hi Everybody,
    I am new bee for java web start.
    We are having swing application which we want to distribute through Java Web Start. Client can run application through provided web link. we also want to download .jnlp file to the client machine when user clicked the link first time.
    I go through different thread for the above problem in this forum, but though not getting clear idea as in our application, we need to generate dynamic .jnlp file. All solution posted for the above problem assuming that .jnlp file exists at some location, but in our case we have to generate it when user clicked it first time. Any body having some idea ?
    Our second problem is, can it possible that user will run the swing application only when he click the link provided on the web server ? In our case authentication of user is done in our web application and when user will click the provided link user id and other information will be pass to swing application as parameters through .jnlp file. If that application will available offline user can run it through last downloaded .jnlp file without clicking the link , which will be not allowded. Also we are concern about multi user environment, as we are thinking to dynamic generation of .jnlp file , it may possible that other user running the same application noted .jnlp file version difference and will download the .jnlp file of other user ?
    Can any body have any idea, how can we done the above scenario ?
    Thanks in advance,
    Dimpal

    If you upgrade to Java 1.4.2 it will present a dialog asking for desktop
    integration the first time you start the application.
    Maybe that's what you want?

  • 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

  • Dynamic JNLP and JWS Application Manager

    All,
    I have a Swing application that communicates to the server via Servlets. I have packaged the entire application into a WAR file and I am using JWS to distribute to the users.
    The "main" method of my application accepts two parameters, one of which is dynamic based on information from the web server. To be able to calculate the value of that parameter, I decided to dynamically create and serve my JNLP file through a servlet. The parameter is then passed into the application via the <argument> tag in the served JNLP file.
    That part works great. However, once the application is installed, it doesn't show up in JWS Application Manager. My best guess is because there is not a "physical" JNLP file for reference.
    Can anyone out there confirm or deny my guess? And, more importantly, can anyone give me an idea on how to keep the dynamic JNLP file and get it to install in the JWS Application Manager?
    Thanks!

    Got it fixed. Apparently, the JWS Application Manager "view" setting wasn't correct. Once it was working, the application was showing up fine.

  • Problem of Dynamic JNLP

    I pass parameters to jsp with request and use jsp to create jnlp with the parameters.
    i use
    http://www.exam.com:8001/csec/Start.jsp?name=aaa
    to pass name to jnlp
    the first time i can get the parameter!
    But when the jsp is reloaded,jnlp will lose the parameter,it will be null
    i can't slove the problem,
    who can help me ,thanks
    Start.jsp
    outj.println("<?xml version=\"1.0\" encoding=\"utf-8\"?>");
    outj.println("<jnlp spec=\"1.0+\" codebase=\"http://www.exam.com:8001/csec"
    + "\"" + " href=\"Start.jsp\">");
    String para = request.getParameter("name");
    null

    Hello Akihabara,
    I am contacting you because you had the same issue before.
    I am having a Application.jar which has 3 different versions. I have created a version.xml to specify about the version of the application.jar.
    Now, I want my user to choose which version he wants to download.
    for example: if he has the application_1.1.jar then he should be given a text box (in a JSP page) to enter which version he wants to download. if he enters 1.2 then that particular version should be downloaded.
    Normally if we want to use versioning then we specify the the version in the JNLP file (EX: <jar href="application.jar" version="1.2" main="true" download="eager" /> )
    I also want the java web start to do "JarDiff" while downloading so that it downloads only the pdated files.
    ( Normally to implement JarDiff we have to mention the "current-version" field in the jnlp file ( Ex: <jar href="application.jar" version="1.2" main="true" download="eager" current-version="1.1" /> )
    I am using JnlpDownloadServlet to process the jnlp file. ( To get dynamic codebase and context path)
    Instead of hard-coding the version field and current version fileld in the JNLP file can i generate a dynamic JNLP which would insert the above values for those fields.
    In a previous post you solved the similar problem using a servlet as you mentioned over there. Did you use JnlpDownloadServlet also? or You had your own servlet?
    Can you guide me regarding this issue.
    Thanks,
    Anjali

  • Dynamic generation of jnlp file

    I'm dynamically generating a jnlp file using a jsp to pass run-time parameters over to my Java application thusly:
    <%
    response.setContentType("application/x-java-jnlp-file");
    String userName = request.getParameter("username");
    String password = request.getParameter("password");
    String batchId = request.getParameter("batchid");
    out.println("<?xml version=\"1.0\" encoding=\"utf-8\"?>");
    out.println("<jnlp ");
    out.println("spec=\"1.0+\" ");
    out.println("codebase=\"http://server/directory\" ");
    out.println("href=\"this jsp file\">");
    ... other jnlp stuff...
    out.println("<application-desc main-class=\"myApp.myClass\">");
    out.println("<argument>" + userName + "</argument>");
    out.println("<argument>" + password + "</argument>");
    out.println("<argument>" + batchId + "</argument>");
    out.println("</application-desc>");
    out.println("</jnlp>");
    And use args[] to attempt to get the passed parameters in the Java application:
    userName = args[0];
    password = args[1];
    batchId = args[2];
    However, they don't seem to be passed over to the application as I get NullPointerExceptions. If I try to trace the state of the arguments by adding:
    FileOutputStream f = new FileOutputStream("w:output.txt");
    BufferedWriter w = new BufferedWriter(new OutputStreamWriter(f, System.getProperty("file.encoding")));
    w.write("userName: " + userName);
    w.write("password: " + password);
    w.write("batchId: " + batchId);
    f.flush();
    f.close();
    The output file is completely empty.
    1. Am I passing the arguments in wrongly?
    2. Why is the output not being written in the file?
    My thanks in advance for any assistance offered.
    Erkton

    Erkton,
    I use a similar approach and it does work. The main gotchas I found were typos. I would suggest temporarily changing the
    response.setContentType("application/x-java-jnlp-file");
    line to
    response.setContentType("text/xml");
    and looking at your JNLP file as XML and verifything that you got everything write. Look for beginning and end tags, stuff like that.
    Once you have it right then switch it back to JNLP.
    One other thing to look out for is Internet Explorer doesn't like jnlp files unless they end with a .jnlp extension. I had to rename my jnlp files to end with .jnlp instead of .jsp for IE to parse them correctly. I don't think thats the issue you are running into, but you may want to look out for it.

  • Problem in jnlp file

    hi,
    For sandbox i created the repository.jnlp file and used.
    at the same time i created the repository.jnlp file for developement server but it giving the error as
    "com.sap.aii.utilxi.misc.api.ReconnectRuntimeException"
    "Cannot open connection on host: (     )  and port:
    i think there is problem in rmi port..
    Is the RMI port is same for both sandbox and Development server????
    regards
    sasi

    hi,
    ur not able to see the file in development pls do chk with the client nos and ports
    make that the file is in active mode
    provide some more info
    thnx
    sampath

  • Mapping problem of JnlpDownloadServlet from .Jnlp file

    Hello All,
    1. I am trying to run a java web start application, i am using tomcat 5.5.20 server. I am using the JnlpDownloadServlet to use the $$codebase and $$name to dynimically code the path to the jar's and the jnlp file.
    Here is what i have done:
    Here i have a JnlpDownloadServlet in a seperate folder called (D:/apache-tomcat-5.5.20/webapps/online/server1/WEB-INF/lib/jnlp-servlet.jar).
    2. Now i am placing my .jnlp and my application jar's in a seperate folder called *"client1"* (D:/apache-tomcat-5.5.20/webapps/online/client1/)
    I need to have the client1 and server1 folders and i have to map the servlet to the jnlp file, because i want to keep my jars's and the servlet in a seperate folders.
    3. I have the web.xml file in WEB-INF folder.
    4. web.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app>
    <servlet>
    <servlet-name> JnlpDownloadServlet</servlet-name>
    <servlet-class>jnlp.sample.servlet.JnlpDownloadServlet</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>JnlpDownloadServlet</servlet-name>
    *<url-pattern>../client1/*.jnlp</url-pattern>* *<!-- /* I am having problem here, i think */ -->*
    </servlet-mapping>
    </web-app>
    Myapp.jnlp:
    <?xml version="1.0" encoding="utf-8"?>
    <jnlp spec="1.0+"
    codebase="$$codebase"
    href="$$name">
    <information>
    </information>
    <resources>
    <j2se version="1.6+"/>
    <jar href="$$codebase/XXXXXX.jar" main="true" download="eager"/>
         <jar href="$$codebase/XXXX.jar" download="eager"/>
         <jar href="$$codebase/XXXXX.jar" download="eager"/>
    <nativelib href="$$codebase/XXX.jar" />
    </resources>
    </jnlp>
    While i run the application. i get the following error:
    Error occured when trying to run a Java web start application
    BadFieldException[ The field <jnlp>codebase has an invalid value: $$codebase,$$codebase]
         at com.sun.javaws.jnl.XMLUtils.getAttributeURL(Unknown Source)
         at com.sun.javaws.jnl.XMLUtils.getAttributeURL(Unknown Source)
         at com.sun.javaws.jnl.XMLFormat.parse(Unknown Source)
         at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(Unknown Source)
         at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(Unknown Source)
         at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(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)
    I need to resolve the mapping issue, because the servlet is not running and the codebase and href variables are not populated.
    Thanks in Advance.

    Hi Peter,
    to use messages of two different SWCVs in a BPM you need to create a based on relationship between the two SWCVs in SLD. BPM restricts object usage to the SWCV in which the BPM itself resides, so to solve your problem go to the SLD content maintenance and select your SWCV of your BPM, click on Usage Dependencies, then select Define Dependencies, choose Installation Time and then the SWCV in which the other objects reside, click save and your done. You might need to reimport the SWCV to the repository to update the relationship there. It is updated as soon as you can see Basis Objects in the SWCV tree.
    best regards
    Christine

  • Problem with .jnlp files

    I have an iMac running 10.6.8. I'm having a problem with .jnlp files. I've downloaded two, cgoban.jnlp and gopanda.jnlp. When I double-click the file, nothing happens. If I Control-click and select Open With Java Web Start, same. Nothing happens. Software Update says my Java is up to date. Any ideas?

    A few other similar threads were solved by this — I'd like to give credit where credit's due but I can't find the original posting.
    /System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/XProtect.meta.p list
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
    <!--
            <key>JavaWebComponentVersionMinimum</key>
            <string>1.6.0_37-b06-435</string>
    -->
            <key>LastModification</key>
            <string>Thu, 31 Jan 2013 04:41:14 GMT</string>
            <key>PlugInBlacklist</key>
            <dict>
                    <key>10</key>
                    <dict>
                            <key>com.macromedia.Flash Player.plugin</key>
                            <dict>
                                    <key>MinimumPlugInBundleVersion</key>
                                    <string>11.3.300.271</string>
                            </dict>
    <!--
                            <key>com.oracle.java.JavaAppletPlugin</key>
                            <dict>
                                    <key>MinimumPlugInBundleVersion</key>
                                    <string>1.7.11.22</string>
                            </dict>
    -->
                    </dict>
            </dict>
            <key>Version</key>
            <integer>2028</integer>
    </dict>
    </plist>

  • Dynamically generating the jnlp file

    Hi Experts,
    Im working on a project in which we launch the Eclipse RCP from the web UI (thin client).
    I want to dynamically generate the jnlp file cause I want to pass the session of the user from the web client to RCP.
    So for this i have thought of having a variable let say sessionID ,which will take value of the session
    sum thing like this...
    <application-desc main-class="com.rcp.core.HelloWorld">
    <property name="sessionID" value="$$userSessionId"/>
    </application-desc>
    But im not able to figure out how i will populate the sessionID variable.
    which class should be responsible for doing this?
    whether that class will be in the RCP code or in the Web code...i guess it is in the web code?
    Please if u can clarify these doubts then it will be great.
    Thanks
    ved

    usually you would use jsp or a servlet to generate the jnlp file.
    If you extend the JnlpDownloadServlet (found in the sample directory in the JDK) you can generate the session id.
    /Andy

  • Jnlp file parameter element problem

    Hello all,
    I have a jar file which contains all the class files and an configuration file of type(.cfg).
    For my application to run properly i need to pass this .cfg file as an argument to the main method in one of the file in the jar...
    i did pass the name of the file as one of the parameter element,but my application is not initialized and not working.but the jar files have been deployed in the local machine.
    so my question is , is there a way so that i can pass my file as a parameter to the main method through jnlp xml file.

    thanks andrew,
    but my problem is that i need to pass the path of my file along with the name of the file to the main method ...and in turn my main method will do all the required processing work..
    the jar file that is to be deployed contains the class files and the .cfg file..
    my jnlp files looks as follows:-
    <jnlp spec="1.0+" codebase="$$codebase" href="voicechat.jnlp">
    <information>
    <title>SIP Based Voice Chat</title>
    <vendor>First Internet Systems Pvt Ltd</vendor>
    <description>Voice Chat</description>
    <description kind="short">Voice Chat </description>
    <icon href="images/demologo.gif"/>
    </information>
    <security>
    <all-permissions/>
    </security>
    <resources>
    <j2se version="1.5" href="http://java.sun.com/products/autodl/j2se"/>
    <jar href="sip.jar"/>
    <jar href="ua.jar"/>
    </resources>
    <application-desc main-class="local.ua.GraphicalUA">
    <argument>-f</argument>
    <argument>a.cfg</argument>
    </application-desc>
    </jnlp>
    the second argument that i had passed is the name of the file in the jar to be passed..
    but as a result when i invoke this file, the jar files are deployed but application is not starting as expected..for it to work the file and its path has to be passed to the main method..
    which is what i tried through argument element...but it does not seem to work..
    so all that i need to know is that, is it possible to pass a file and its path as an argument in the jnlp file..

  • Problem changing JNLP file association

    I installed SUN JRE 1.5 Update 7 in a fresh Windows XP machine and found the registry recongizes the JNLP file extension is associatied with it. Then I installed an application that downloads IBM WebSphere Application Client 6 which actually uses IBM JRE 1.4.2 . After this installation IBM JRE changes the .jnlp file association from Sun JRE 1.5.0_07 to its own 1.4.2 version.
    Now I needed to change the JNLP file association back to previous one. I used Windows Explorer->Tool->Folder Options->File Types->Advanced->Edit and did that. However, I see my registry didn't change the association from IBM JRE to Sun JRE. But when I look at Java Control Panel, it says its associated with Sun JRE. Here is a windows shell script that I run to see the current JNLP file assocaition - which alwasy tells me its OBM JRE which is associated with the JNLP file extension. I tried restarting the machine, removing the cached copy from Java Control Panel without any difference.
    Can you tell me when this file type association may not work and why? Is there any Windows Security Patch issue here? Also what are the registry keys that I should look for (a few are mentioned in the script below)?
    code:
    // To run it:
    // CScript //Nologo JWS.js
    var fso = new ActiveXObject("Scripting.FileSystemObject")
    var gShell = new ActiveXObject("WScript.Shell")
    function print(s) {
    WScript.Echo(s)
    function JavaSoft_JWS() {
    var regKey = "HKLM\\SOFTWARE\\JavaSoft\\Java Web Start\\"
    var ver = gShell.RegRead(regKey + "\\CurrentVersion")
    var path = gShell.RegRead(regKey + "\\" + ver + "\\Home")
    var javaws = path + "\\javaws.exe"
    print("Sun JWS")
    print("\tversion: " + ver)
    print("\texe: " + javaws)
    function IBM_JWS() {
    var ver = "1.4.2"
    var regKey = "HKLM\\SOFTWARE\\IBM\\Java Web Start v" + ver + "\\"
    var path = gShell.RegRead(regKey + "\\" + ver + "\\Home")
    var javaws = path + "\\javaws.exe"
    print("IBM JWS for HKLM: ")
    print("\tversion: " + ver)
    print("\texe: " + javaws)
    function JNLP_ASSOC_HKEY_LOCAL() {
    var regKey = "HKEY_LOCAL_MACHINE\\SOFTWARE\\Classes\\JNLPFile\\Shell\\Open\\Command\\"
    var path = gShell.RegRead(regKey)
    var javaws = path + "\\javaws.exe"
    print("HKEY LOCAL MACHINE Current JNLP File Association: ")
    print("\texe: " + javaws)
    function JNLP_assoc_HKCR() {
    var regKey = "HKCR\\JNLPFile\\Shell\\Open\\Command\\"
    var path = gShell.RegRead(regKey)
    print("Current JNLPFIle association for HKCR:\t" + path)
    function main(args) {
    JNLP_ASSOC_HKEY_LOCAL()
    JNLP_assoc_HKCR()
    JavaSoft_JWS()
    IBM_JWS()
    ---------------------------------------

    Did the clients happen to know what version they were upgrading from? We have seen this mostly when a system upgrades major Java versions, eg from 1.6 or 1.7 or switching from 32 to 64 bit Java and C:\Windows\System32\javaws.exe disappears or something silly.

Maybe you are looking for

  • Email notification - Ok/Cancel text in the email

    Hello , I am using oracle BPM 11g , have configured Human Task to send email notification to owner of the task . Email gets sent correctly but in the body of email i am getting text as "OK/Cancel" (at the bottom of email ) Not sure how to remove this

  • Windows Media Player ActiveX not playing image, but WMP stand alone application does. Why?

    I use my Windows Media Player v11 with additional codec to play mp4 files (mp4 are not supported by default with WMP 11, so I had to install a codec). It works fine in the stand alone application, but when I use the ActiveX control in NI, it does not

  • Fix with remove problem

    Using the Essbase version 6.2 I have tried without luck to do a fix combined with remove.My problem is that I want to remove 2 nodes. If have tried the following.FIX (@remove(@idescendants(D_ABM_MEASURE),"TOTAL COST"));CALC DIM (D_ABM_GL_ACC_DIM, D_A

  • Question about Series, Gaming X, GDXX, HXX ? Which is better?

    I have been seen lots of acronyms that I don't know what it mean to be. What make me decide for z97 GD65 Gaming instead z97 Gaming 7 was the price, the GD65 was more expensive so I thought if is more expensive, is better! The questions is: What's mea

  • I have all three of my mail is synchronize in the mail

    I have my Yahoo my main account to them is synchronize, but when I try to send a mail from my yahoo account. it says I am not online what do I do???????