-1

I have a jnlp file and I run it from an url in jsf page. for ex: http://localhost:8080/Test.jnlp

I want to pass parameter to my main class which is run with jnlp file.
Ex: http://localhost:8080/Test.jnlp?username=testuser

I want use it in my main class.

Test.java

String myuserName=username;

Do anyone has any idea how to pass parameter like this?

2 Answers2

0

You should use request.getParameter("username")

Vishnu T S
  • 3,476
  • 2
  • 23
  • 39
0

This is arguably a duplicate of this question: Pass dynamic params via JNLP

To sum up the accepted answer on that post, this isn't possible without dynamically creating the JNLP file when attempting to launch.

One possible work around would be to store the information you're trying to send in a parameter on the server in a database with the ipaddress of the machine making the request. Then query the server once the application launches in order to obtain whatever information you need.

Hope this helps!

Francis Bartkowiak
  • 1,374
  • 2
  • 11
  • 28