abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmsn...@apache.org
Subject svn commit: r510083 - /incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/servlet/HttpServletRequestContext.java
Date Wed, 21 Feb 2007 16:18:10 GMT
Author: jmsnell
Date: Wed Feb 21 08:18:10 2007
New Revision: 510083

URL: http://svn.apache.org/viewvc?view=rev&rev=510083
Log:
Add method to access the HttpServletRequest
Do not create a new HttpSession by default.

Modified:
    incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/servlet/HttpServletRequestContext.java

Modified: incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/servlet/HttpServletRequestContext.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/servlet/HttpServletRequestContext.java?view=diff&rev=510083&r1=510082&r2=510083
==============================================================================
--- incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/servlet/HttpServletRequestContext.java
(original)
+++ incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/servlet/HttpServletRequestContext.java
Wed Feb 21 08:18:10 2007
@@ -91,8 +91,16 @@
     return request.getInputStream();
   }
   
-  private synchronized HttpSession getSession() {
-    if (session == null) session = request.getSession(true);
+  public HttpServletRequest getRequest() {
+    return request;
+  }
+  
+  public synchronized HttpSession getSession() {
+    return getSession(false);
+  }
+  
+  public synchronized HttpSession getSession(boolean create) {
+    if (session == null) session = request.getSession(create);
     return session;
   }
   



Mime
View raw message