Applet 和 JSF 集成 - 示例 [英] Applet and JSF Integration - example

查看:22
本文介绍了Applet 和 JSF 集成 - 示例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有使用 JSF 的教程或简单的小程序示例?如何从小程序向托管 Bean 执行请求?

Is there a tutorial or a simple applet example with JSF? How do I perform a request to a Managed Bean from an applet?

推荐答案

JSF(以及托管 bean)在服务器上执行以生成 HTML;小程序在客户端的机器上执行 - 因此您不能只将对托管 bean 的引用传递给小程序.

JSF (and hence managed beans) executes on the server to produce HTML; An applet executes on the client's machine - so you can't just pass a reference to a managed bean to an applet.

如果您只需要在启动时将值从托管 bean 传递给 Applet,您可以使用 标记 以传递此值.

If you just need to pass a value from a managed bean to an Applet at start time, you can use the <param> sub-element of the tag to pass this value.

如果您需要对托管 bean 进行某种动态访问,那将会困难得多——基本上,您需要构建某种由托管 bean 支持的 Web 服务,以便小程序可以创建 http请求返回服务器以获取所需的值.

If you need some kind of dynamic access to the managed bean, it's going to be a lot harder - basically, you'll need to build some kind of web service that's backed by the managed bean so that the applet can make http requests back to the server to get the values it needs.

这篇关于Applet 和 JSF 集成 - 示例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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