Include session ID in error message logged when trying to set an attribute on an...
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Thu, 8 Jul 2010 00:05:38 +0000 (00:05 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Thu, 8 Jul 2010 00:05:38 +0000 (00:05 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@961541 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/catalina/session/LocalStrings.properties
java/org/apache/catalina/session/StandardSession.java
webapps/docs/changelog.xml

index c798044..6185037 100644 (file)
@@ -60,7 +60,7 @@ standardSession.notSerializable=Cannot serialize session attribute {0} for sessi
 standardSession.removeAttribute.ise=removeAttribute: Session already invalidated
 standardSession.sessionEvent=Session event listener threw exception
 standardSession.setAttribute.iae=setAttribute: Non-serializable attribute {0}
-standardSession.setAttribute.ise=setAttribute: Session already invalidated
+standardSession.setAttribute.ise=setAttribute: Session [{0}] has already been invalidated
 standardSession.setAttribute.namenull=setAttribute: name parameter cannot be null
 standardSession.sessionCreated=Created Session id = {0}
 persistentManager.loading=Loading {0} persisted sessions
index 1de9060..9e1c61e 100644 (file)
@@ -1391,8 +1391,8 @@ public class StandardSession
 
         // Validate our current state
         if (!isValidInternal())
-            throw new IllegalStateException
-                (sm.getString("standardSession.setAttribute.ise"));
+            throw new IllegalStateException(sm.getString(
+                    "standardSession.setAttribute.ise", getIdInternal()));
         if ((manager != null) && manager.getDistributable() &&
           !(value instanceof Serializable))
             throw new IllegalArgumentException
index ebe9ea6..1a02f41 100644 (file)
         Improve logging of unhandled exceptions in servlets by including the
         path of the context where the error occurred. (markt)
       </add>
+      <add>
+        Include session ID in error message logged when trying to set an
+        attribute on an invalid session. (markt)
+      </add>
     </changelog>
   </subsection>
   <subsection name="Jasper">