Session JSR286 Portlet统计联机用户数
我想创建一个名为VisitCounter的JSR286 Portlet,安装在WebSpherePortal8.0上。VisitCounter统计联机用户数Session JSR286 Portlet统计联机用户数,session,portlet,jsr286,Session,Portlet,Jsr286,我想创建一个名为VisitCounter的JSR286 Portlet,安装在WebSpherePortal8.0上。VisitCounter统计联机用户数 public void doView(RenderRequest request, RenderResponse response) throws PortletException, IOException { // Set the MIME type for the render response resp
public void doView(RenderRequest request, RenderResponse response) throws PortletException, IOException {
// Set the MIME type for the render response
response.setContentType(request.getResponseContentType());
// Check if portlet session exists
VisitCounterPortletSessionBean sessionBean = getSessionBean(request);
if( sessionBean==null ) {
//response.getWriter().println("<b>NO PORTLET SESSION YET</b>");
return;
}
........
}
public void doView(RenderRequest请求、RenderResponse响应)抛出PortletException、IOException{
//设置呈现响应的MIME类型
response.setContentType(request.getResponseContentType());
//检查portlet会话是否存在
VisitCounterPortletSessionBean sessionBean=getSessionBean(请求);
if(sessionBean==null){
//response.getWriter().println(“还没有PORTLET会话”);
回来
}
........
}
怎么做这个?
谢谢 public void doView(RenderRequest请求、RenderResponse响应)抛出PortletException、IOException{
//设置呈现响应的MIME类型
response.setContentType(request.getResponseContentType())
//检查portlet会话是否存在
VisitCounterPortletSessionBean sessionBean=getSessionBean(请求);
if(sessionBean==null){
//response.getWriter().println(“还没有PORTLET会话”);
回来
}
........
}
正在使用应用程序范围
// Check if portlet session exists
VisitCounterPortletSessionBean sessionBean = getSessionBean(request);
if( sessionBean==null ) {
//response.getWriter().println("<b>NO PORTLET SESSION YET</b>");
return;
}
........