Author: keith
Date: Fri Mar 28 23:22:29 2008
New Revision: 15319

Log:

Taking the contextPath also into consideration during login



Modified:
   trunk/mashup/java/modules/core/src/org/wso2/mashup/utils/MashupUtils.java
   
trunk/mashup/java/modules/core/src/org/wso2/mashup/webapp/identity/RegistrationBean.java

Modified: 
trunk/mashup/java/modules/core/src/org/wso2/mashup/utils/MashupUtils.java
==============================================================================
--- trunk/mashup/java/modules/core/src/org/wso2/mashup/utils/MashupUtils.java   
(original)
+++ trunk/mashup/java/modules/core/src/org/wso2/mashup/utils/MashupUtils.java   
Fri Mar 28 23:22:29 2008
@@ -456,7 +456,8 @@
         return serviceUiSource;
     }
 
-    public static void login(String username, String password, String 
cookieString)
+    public static void login(String username, String password, String 
cookieString,
+                             String contextPath)
             throws MashupFault {
         Parameter parameter = null;
         AxisConfiguration configuration = null;
@@ -479,7 +480,7 @@
             Options options = client.getOptions();
             options.setAction("urn:login");
             options.setTo(new EndpointReference("http://localhost:"; + 
serverManager.getHttpPort() +
-                    context.getContextRoot() + context.getServicePath() +
+                    contextPath + context.getContextRoot() + 
context.getServicePath() +
                     "/MashupLoginServiceUT/login"));
             options.setUserName(username);
             options.setPassword(password);

Modified: 
trunk/mashup/java/modules/core/src/org/wso2/mashup/webapp/identity/RegistrationBean.java
==============================================================================
--- 
trunk/mashup/java/modules/core/src/org/wso2/mashup/webapp/identity/RegistrationBean.java
    (original)
+++ 
trunk/mashup/java/modules/core/src/org/wso2/mashup/webapp/identity/RegistrationBean.java
    Fri Mar 28 23:22:29 2008
@@ -184,7 +184,8 @@
 
                 // Log user in as primary if option has been chosen.
                 if 
(MashupConstants.TRUE.equals(request.getParameter(MashupConstants.SIGNIN))) {
-                    MashupUtils.login(userName, password, 
request.getSession().getId());
+                    MashupUtils.login(userName, password, 
request.getSession().getId(),
+                                      request.getContextPath());
                     SecureRegistry secureRegistry =
                             RegistryUtils.createSecureRegistry(userName, 
password,
                                                                jdbcRegistry, 
realm);

_______________________________________________
Mashup-dev mailing list
[email protected]
http://www.wso2.org/cgi-bin/mailman/listinfo/mashup-dev

Reply via email to