eclipse rcp/rap Java EE 6 安全性
我有一个 eclipse rcp/rap 应用程序,我想连接到 Java EE 6 EJB...我的问题是在 EJB 中我使用一些 Java EE 6 标准安全性 @RolesAllowed ...
但我不这样做不知道如何在 RCP/RAP 中实现这一点......???
我看到了一种方法:java ee 6 enterprise application security
在web中,我所要做的就是使用 servlet 3.0 request.login(user, pass)
RCP/RAP 中是否可以有此功能...?我还想检查用户的角色,以便我知道用户是否有权查看某些内容...
提前谢谢
I have a eclipse rcp/rap application and I want to connect to Java EE 6 EJBs... My problem is that in EJB I use some Java EE 6 standard security @RolesAllowed ...
but I don't know how to implement this in RCP/RAP...???
I saw a way: java ee 6 enterprise application security
In web, all I have to do is to use servlet 3.0 request.login(user, pass)
Is it possible to have this feature in RCP/RAP... ?? I also want to check roles of users so that I know if a user have rights to see something...
Thank you in advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不了解 RCP,但对于 RAP,您应该能够执行与常规 Web 应用程序相同的操作。 RAP 1.5 可与 servlet 3.0 配合使用。
如果您使用的是 Eclipse 工作台,则您正在 SWT_COMPATIBILITY 模式下运行(请参阅
ApplicationConfiguration#setOperationMode()
)。这意味着您只能从请求线程中的可运行对象访问安全上下文(请参阅RWT#requestThreadExec()
)。在使用 JEE_COMPATIBILITY 模式的普通 RAP 应用程序中,这是不必要的。I don't know about RCP, but for RAP, you should be able to do the same as in regular web apps. RAP 1.5 works with servlet 3.0.
If you're using the Eclipse workbench, you're running in the SWT_COMPATIBILITY mode (see
ApplicationConfiguration#setOperationMode()
). That means you can only access the security context from a runnable in the request thread (seeRWT#requestThreadExec()
). In plain RAP applications that use the JEE_COMPATIBILITY mode, this is not necessary.