从 portlet 中的 doView 方法重定向
我正在使用 Websphere Portal 6.0,我想知道是否有一种方法可以告诉服务器从 doView 方法呈现哪个页面。 我知道我可以通过 processAction 方法来做到这一点,但不幸的是问题的语义不允许这样做。
感谢您的帮助
I'm using Websphere portal 6.0 and I'm wondering if there's a way in which I can tell the server which page to render from the doView method. I know I can do it from the processAction method but unfortunately the semantics of the problem don't allow it.
Thank you for your help
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
据我了解,您想要决定向用户显示哪个 JSP/HTML 页面。
在这种情况下,这就是您需要做的。
您可以决定每次要获取哪个jsp 的请求调度程序。
As I understand, you want to decide which JSP/HTML page you are going to show to the user.
In that case, this is what you need to do.
You can decide each time which jsp you want to obtain the request dispatcher for.
我怀疑是否可以在 doView() 中发送重定向。 原因有两个:
一般来说,我想说如果 portlet 需要在 doView 中进行重定向,那么它可能需要重新设计。 也许尝试更详细地描述您的问题。
I doubt it is possible to send a redirect in doView(). Two reasons for that:
In general, I'd say if portlet needs to do a redirect in doView, then it may require a redesign. Perhaps try to describe your problem in more details.