.net MVC应用程序如何使用JWS与Core Java桌面应用程序通信? [英] how .net MVC application can communicate with Core java desktop application using JWS?

查看:86
本文介绍了.net MVC应用程序如何使用JWS与Core Java桌面应用程序通信?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个Java桌面应用程序,我们计划使用JWS启动该Java桌面应用程序,并且运行良好。

We have a java desktop application and we are planning to launch that java desktop application using JWS and that is working absolutely fine.

问题是-我们在网页上向用户询问一些与用户相关的信息,并使用JWS启动Java桌面应用程序。现在,我们希望在Java应用程序的网页上提供用户提供的信息。请建议我们如何使用Java代码访问这些信息?我们找到了两种方法-

The issue is -- we ask some user related information from user on web page and launch java desktop application using JWS. Now we would like to have that information provided by user on web page in our java application. Please suggest how we can access those information in java code ? We have find two approaches --


  1. java代码可以从cookie中读取该信息吗?我没有找到任何帮助如何使用核心Java代码读取Cookie?再次,如果用户的桌面上未启用Cookie,该怎么办?

  1. Can java code read that information from cookies ? I have not find any help how to read cookies using core java code ? again what if cookies are not enable on user's desktop ?

我们可以使用JNLP文件传递信息吗?我们可以将所有信息写入JNLP文件吗?可以作为参数传递给Java代码?这里的论点长度重要吗?我们可以通过其他方式从JNLP获得信息吗?

Can we pass information using JNLP file ? Can we write all information in JNLP file ? can pass as an argument to the java code ? does the length of the argument matter here ? can we get information from JNLP by some other way ?

请建议,如果您知道另外一种更好的方法,那么以上两种方法?

Please suggest if you know another approach better then these above two approaches?

推荐答案

我们可以排除方法1。

方法2是如果信息很少,则可以。在我们的一个项目中,我们根据从Web界面接收到的信息动态生成jnlp文件,从而为用户定制了Java应用程序。

Approach 2 is fine if the information is minimal. In one of our projects, we dynamically generated the jnlp file, based on information received from the web interface, which resulted in the java application being customized for the user.

您也可以使应用程序与后端进行通信(例如通过http),并根据需要提取更多信息。

You could also have the application communicate with the backend (say over http) and pull more information as required.

这篇关于.net MVC应用程序如何使用JWS与Core Java桌面应用程序通信?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆