.net MVC 应用程序如何使用 JWS 与 Core java 桌面应用程序进行通信?
我们有一个 java 桌面应用程序,我们计划使用 JWS 启动该 java 桌面应用程序,并且运行得非常好。
问题是——我们在网页上向用户询问一些用户相关信息,并使用 JWS 启动 java 桌面应用程序。现在我们希望用户在我们的 java 应用程序的网页上提供该信息。请建议我们如何在java代码中访问这些信息?我们找到了两种方法 -
Java 代码可以从 cookie 中读取该信息吗?我没有找到任何帮助如何使用核心java代码读取cookie?如果用户桌面上未启用 cookie,又会怎样?
我们可以使用 JNLP 文件传递信息吗?我们可以将所有信息写入JNLP文件中吗?可以作为参数传递给java代码吗?参数的长度在这里重要吗?我们可以通过其他方式从 JNLP 获取信息吗?
请建议您是否知道比上述两种方法更好的另一种方法?
We have a java desktop application and we are planning to launch that java desktop application using JWS and that is working absolutely fine.
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 --
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 ?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我们可以排除方法 1。
如果信息很少,方法 2 就可以。在我们的一个项目中,我们根据从 Web 界面收到的信息动态生成 jnlp 文件,从而为用户定制 Java 应用程序。
您还可以让应用程序与后端通信(例如通过 http)并根据需要提取更多信息。
We can rule out approach 1.
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.
You could also have the application communicate with the backend (say over http) and pull more information as required.