KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > exoplatform > commons > debug > PortletSessionHelper


1 /***************************************************************************
2  * Copyright 2001-2003 The eXo Platform SARL All rights reserved. *
3  * Please look at license.txt in info directory for more license detail. *
4  **************************************************************************/

5 package org.exoplatform.commons.debug;
6
7 import java.util.* ;
8 import java.io.PrintStream JavaDoc ;
9
10 import javax.portlet.PortletSession ;
11 /**
12  * Static helper methods for string operations.
13  * Author: Tuan Nguyen
14  */

15 public class PortletSessionHelper {
16   
17   static public void printKeyValues(PrintStream JavaDoc out , PortletSession session) {
18     Enumeration e = session.getAttributeNames() ;
19     while(e.hasMoreElements()) {
20       String JavaDoc key = (String JavaDoc) e.nextElement() ;
21       out.println(key + ": " + session.getAttribute(key));
22     }
23   }
24 }
25
Popular Tags