Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Bartel2015-07-28 05:49:31 +0000
committerJan Bartel2015-07-28 05:49:31 +0000
commit2e4941920bc3eecc877804016834ee53a0395f69 (patch)
tree35304db24ffcef53dc331095812f6f5d280fa8dd
parentdea406d2b3cb708fe728a5e782743c7eccffefb3 (diff)
downloadorg.eclipse.jetty.project-2e4941920bc3eecc877804016834ee53a0395f69.tar.gz
org.eclipse.jetty.project-2e4941920bc3eecc877804016834ee53a0395f69.tar.xz
org.eclipse.jetty.project-2e4941920bc3eecc877804016834ee53a0395f69.zip
Add object as session attribute for SessionDump test servlet
-rw-r--r--tests/test-webapps/test-jetty-webapp/src/main/java/com/acme/SessionDump.java18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/test-webapps/test-jetty-webapp/src/main/java/com/acme/SessionDump.java b/tests/test-webapps/test-jetty-webapp/src/main/java/com/acme/SessionDump.java
index 7ed7413b0c..0e484b71c4 100644
--- a/tests/test-webapps/test-jetty-webapp/src/main/java/com/acme/SessionDump.java
+++ b/tests/test-webapps/test-jetty-webapp/src/main/java/com/acme/SessionDump.java
@@ -36,6 +36,23 @@ import javax.servlet.http.HttpSession;
@SuppressWarnings("serial")
public class SessionDump extends HttpServlet
{
+ /**
+ * Simple object attribute to test serialization
+ */
+ public class ObjectAttributeValue implements java.io.Serializable
+ {
+ long l;
+
+ public ObjectAttributeValue(long l)
+ {
+ this.l = l;
+ }
+
+ public long getValue()
+ {
+ return l;
+ }
+ }
int redirectCount=0;
/* ------------------------------------------------------------ */
@@ -64,6 +81,7 @@ public class SessionDump extends HttpServlet
{
session = request.getSession(true);
session.setAttribute("test","value");
+ session.setAttribute("obj", new ObjectAttributeValue(System.currentTimeMillis()));
}
else if (session!=null)
{

Back to the top