[英]JSR 286 Portlet Count the number of user online
我想創建一個名為VisitCounter的JSR 286 Portlet,以安裝在Websphere Portal 8.0上。 VisitCounter計算在線用戶數。
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 request,RenderResponse response)throws PortletException,IOException {//設置渲染響應的MIME類型。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;
}
........
}
正在使用應用程序范圍...
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.