关于portlet参数的问题

dfmouse 2007-10-09 12:04:20
源码:
public void processAction(ActionRequest request,
ActionResponse actionResponse) throws PortletException,
java.io.IOException {

String flag = "flag";
System.out.println("*************************************************");
System.out.println("flag:" + flag);
actionResponse.setRenderParameter("flag", flag);
}

public void doView(RenderRequest request, RenderResponse response)
throws PortletException, IOException {

String flag = request.getParameter("flag");
System.out.println("#################################################");
System.out.println("flag:" + flag);
response.setContentType(request.getResponseContentType());
PortletRequestDispatcher rd = getPortletContext().getRequestDispatcher("view");
rd.include(request,response);
}
_______________________________________________________________________________________________

打印结果:
*************************************************
flag:flag
#################################################
flag:flag#60
_______________________________________________________________________________________________

问题:
为什么会多出一个"#60"
换了个测试环境会多个"#48"
或者大概和什么有关系
...全文
79 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
dfmouse 2007-10-09
  • 打赏
  • 举报
回复
现在知道"#xx"中"#"后面的这个数字是portlet的id

81,092

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧