【发布时间】:2010-01-12 08:35:38
【问题描述】:
我有一个简单的 HTML 页面,其中包含一个表单(使用 GET 方法),其操作是一个包含 JSF portlet 的门户页面。 我需要在我的 portlet 中访问传递到门户页面的参数 - 我该如何实现?
我尝试使用以下代码访问视图页面上的参数code,但值显示为null。
java.util.Map requestMap = javax.faces.context.FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap();
String code = requestMap.get("code");
在其他一些论坛上,有人建议我需要将 portlet id 作为请求参数传递,以便让 portlet 访问传递的请求参数。如果这是真的,我可以在哪里/如何查找我的 portlet ID,以便 portlet 可以访问请求参数?
【问题讨论】:
标签: jsf portlet websphere-6.1 websphere-portal