openamf/src/java/org/openamf RequestContext.java,1.4,1.5

Sean Sullivan <[email protected]> Mon, 21 Feb 2005 08:26:23 +0000
Newsgroups gmane.comp.java.openamf.cvs
Message-ID <[email protected]>
Update of /cvsroot/openamf/openamf/src/java/org/openamf
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv951/src/java/org/openamf

Modified Files:
	RequestContext.java 
Log Message:
new method:  getHttpSession(boolean)

Index: RequestContext.java
===================================================================
RCS file: /cvsroot/openamf/openamf/src/java/org/openamf/RequestContext.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** RequestContext.java	18 Sep 2004 02:52:21 -0000	1.4
--- RequestContext.java	21 Feb 2005 08:26:21 -0000	1.5
***************
*** 110,114 ****
       *  
       * @return a non-null value
!      * 
       * @see #getHttpServletRequest
       * 
--- 110,115 ----
       *  
       * @return a non-null value
!      *
!      * @see #getHttpSession(boolean)
       * @see #getHttpServletRequest
       * 
***************
*** 116,119 ****
--- 117,135 ----
      static public HttpSession getHttpSession()
  	{
+     	return getHttpSession(true);
+     }
+     
+     /**
+      *  
+      * @return a non-null value
+      *
+      * @param create
+      * 
+      * @see #getHttpSession()
+      * @see #getHttpServletRequest
+      * 
+      */
+     static public HttpSession getHttpSession(boolean create)
+ 	{
      	HttpServletRequest req = getHttpServletRequest();
      	if (req == null)
***************
*** 121,128 ****
      		throw new IllegalStateException("HttpServletRequest is null");
      	}
!     	return req.getSession(true);
      }
      
-     
      /**
       * 
--- 137,143 ----
      		throw new IllegalStateException("HttpServletRequest is null");
      	}
!     	return req.getSession(create);
      }
      
      /**
       * 



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click