简体   繁体   English

从applet在JSP Page上获取价值

[英]Getting value at JSP Page from applet

I don't know how to get value of applet at JSP. 我不知道如何在JSP上获得applet的价值。 A value is set by user (in the applet). 由用户(在小程序中)设置一个值。 I want to display this value on some different JSP. 我想在一些不同的JSP上显示此值。

Can anybody give some guidance on this? 有人可以为此提供一些指导吗?

An applet can construct an URL containing the user data as a name/value pair 1 . 小程序可以构造一个包含用户数据作为名称/值对1的URL。 It can then use the show document method 2 of the applet context to call the other JSP. 然后,它可以使用applet上下文的show document方法2来调用另一个JSP。

  1. http://our.com/answer.jsp?name1=value1&name2=value2 http://our.com/answer.jsp?name1=value1&name2=value2
  2. AppletContext.showDocument(URL)

使用<jsp:plugin>标记,您可以参考该教程以获取详细信息。

JSP is a server-side thing while applet runs in browser so why and how should these communicate ? 当applet在浏览器中运行时,JSP是服务器端的东西,因此为什么以及如何进行通信? If you need to read some data from an applet and insert them to a page, just make the applet scriptable and call its method . 如果您需要从applet中读取一些数据并将其插入页面,只需将applet编写为脚本并调用其method即可

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

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