简体   繁体   English

从jnlp文件中的URL传递动态参数

[英]Passing dynamic parameter from the url in jnlp file

I have a server that runs on the following url. 我有一台在以下URL上运行的服务器。

http://localhost:8080/

I have JNLP file inside the tomcat folder and hence i can access it by 我在tomcat文件夹中有JNLP文件,因此我可以通过访问它

http://localhost:8080/abc.jnlp 

or by the server ip 或通过服务器ip

http://public-ip.org./abc.jnlp

Now the problem is i have a file that can be opened with the jnlp file. 现在的问题是我有一个可以使用jnlp文件打开的文件。 I want to pass that file as the parameter. 我想将该文件作为参数传递。 So what i did was: 所以我所做的是:

@RequestMapping(value="showjnlp",method=RequestMethod.GET)
public void showJnlp(){
Process p=RunTime.getRuntime().exec("javaws -open fileName abc.jnlp");
}

Now if i do this the file opens in the server computer where the war file hosted. 现在,如果执行此操作,则文件将在托管war文件的服务器计算机中打开。 I want to open the file in the client side. 我想在客户端打开文件。 Anyone who knows how to open the file that resides in the server that can be passed as the parameter to the client side or be opened in the client side computer? 有谁知道如何打开驻留在服务器中的文件,该文件可以作为参数传递给客户端,也可以在客户端计算机中打开?

如果您可以将jnlp作为网页链接到客户端,它将下载到客户端计算机中并在其中运行。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM