File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to make a JNLP file take dynamic parameter

 
Ket Nonting
Greenhorn
Posts: 20
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
This JNLP snippet from Oracle tutorial web site takes static parameters from the admin commands.

I'm wondering if it could take parameters from user input like string variables.

To make it clear, my applet would take variables from user input and display those values on the display panel.

I've no problem with a normal applet, it works fine. But how do I make the JNLP file does the same.
My normal applet's approach is:

It's triggered by javascript.

Thanks in advance
 
Paul Clapham
Sheriff
Pie
Posts: 20203
26
MySQL Database
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You will recall that a JNLP file is downloaded from the server. So the server would have to generate the JNLP file and set the parameter appropriately.
 
Ket Nonting
Greenhorn
Posts: 20
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Paul,

Can you please elaborate a little more. I do not understand this.
 
Tim Moores
Bartender
Posts: 2500
12
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The JNLP could be generated by a JSP (or PHP) page which takes user input through an HTML form submit.
 
Ket Nonting
Greenhorn
Posts: 20
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Tim,
Here's my PHP file, which works fine for a normal applet:


Here the javascript to trigger a JNLP file


and the JNLP file

So how do make the JNLP file take string parameter? It would work just fine if I do it like this:
 
Tim Moores
Bartender
Posts: 2500
12
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not sure what you're asking - where do you see the difference between the page with the explicit applet tag and the one with the JNLP applet? Both can easily be served by PHP, and would get the value of the "random" string in the same way, in whichever way that works.
 
Ket Nonting
Greenhorn
Posts: 20
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The problem is here:

<param name='String' value='images/random/' .$random. '.jpg'>

On the JNLP file. It does not work. This is the only line I struggle with.
 
Ket Nonting
Greenhorn
Posts: 20
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
YEEEEHA! I solved it.

this thing stupid
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic