[wsas-java-dev] svn commit r594 - in wsas/java/trunk/modules:
core/src/org/wso2/wsas/transport/jetty www/extensions/core/js
svn at wso2.com
svn at wso2.com
Wed Jan 24 03:20:05 PST 2007
Author: saminda
Date: Wed Jan 24 03:19:28 2007
New Revision: 594
Modified:
wsas/java/trunk/modules/core/src/org/wso2/wsas/transport/jetty/Axis2Handler.java
wsas/java/trunk/modules/www/extensions/core/js/wso2wsas.js
Log:
fixes to handler
Modified: wsas/java/trunk/modules/core/src/org/wso2/wsas/transport/jetty/Axis2Handler.java
==============================================================================
--- wsas/java/trunk/modules/core/src/org/wso2/wsas/transport/jetty/Axis2Handler.java (original)
+++ wsas/java/trunk/modules/core/src/org/wso2/wsas/transport/jetty/Axis2Handler.java Wed Jan 24 03:19:28 2007
@@ -247,24 +247,41 @@
SessionContext sessionContext =
(SessionContext) httpSession.getAttribute(Constants.SESSION_CONTEXT_PROPERTY);
if (sessionContext == null) {
- System.out.println("### Created New SessionContext :: ");
- String cookieValueString = Long.toString(System.currentTimeMillis());
- Cookie userCookie = new Cookie("__WSAS_SESSION_COOKIE__", cookieValueString);
- userCookie.setMaxAge(-1); // When the browse exists cookie will die.
- response.addCookie(userCookie);
+ System.out.println("### Created New SessionContext :: context root :: " +
+ request.getContextPath() + " :: Request URI :: " +
+ request.getRequestURI());
+ String cookieValueString = createSessionCookie(response);
sessionContext = new SessionContext(null);
sessionContext.setCookieID(cookieValueString);
httpSession.setAttribute(Constants.SESSION_CONTEXT_PROPERTY, sessionContext);
msgContext.setSessionContext(sessionContext);
} else {
System.out.println(
- "#### Uesed Exising SessionContet :: " + sessionContext.getCookieID());
+ "#### Uesed Exising SessionContet :: " + sessionContext.getCookieID() +
+ " Context Path :: " + request.getContextPath() + " :: Request URI " +
+ request.getRequestURI());
}
}
}
+ private String createSessionCookie(HttpServletResponse response) {
+ String cookieValueString = Long.toString(System.currentTimeMillis());
+ Cookie userCookie = new Cookie("__WSAS_SESSION_COOKIE__", cookieValueString);
+ userCookie.setMaxAge(-1); // When the browse exists cookie will die.
+ userCookie.setPath("/");
+ userCookie.setSecure(true);
+ response.addCookie(userCookie);
+ /*This is to handle anything from Axis2 client*/
+ Cookie axis2Cookie = new Cookie(Constants.SESSION_COOKIE,cookieValueString);
+ axis2Cookie.setMaxAge(-1); // When the browse exists cookie will die.
+ axis2Cookie.setPath("/");
+ axis2Cookie.setSecure(true);
+ response.addCookie(axis2Cookie);
+ return cookieValueString;
+ }
+
protected abstract boolean processPostRequest(MessageContext msgContext,
HttpServletRequest request,
HttpServletResponse response)
Modified: wsas/java/trunk/modules/www/extensions/core/js/wso2wsas.js
==============================================================================
--- wsas/java/trunk/modules/www/extensions/core/js/wso2wsas.js (original)
+++ wsas/java/trunk/modules/www/extensions/core/js/wso2wsas.js Wed Jan 24 03:19:28 2007
@@ -20,6 +20,9 @@
var SERVICE_CONTEXT = "/soap";
+var COOKIE_SESSION_MANAGEMENT = true;
+var SESSION_COOKIE_NAME = "__WSAS_SESSION_COOKIE__";
+
function init() {
URL = locationString.substring(0, locationString.lastIndexOf('/'));
More information about the Wsas-java-dev
mailing list