src/index.jsp
changeset 35310 0c885bc2fcec
parent 34507 4ace8ed532f5
child 35503 2d10c9fb9cd4
--- a/src/index.jsp	Fri Jan 11 09:54:50 2019 +0100
+++ b/src/index.jsp	Mon Jan 14 10:37:29 2019 +0100
@@ -32,7 +32,7 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2011-2018 Openbravo SLU
+ * All portions are Copyright (C) 2011-2019 Openbravo SLU
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -45,7 +45,11 @@
 
 AuthenticationManager authManager = AuthenticationManager.getAuthenticationManager(this);
 if (!adSessionPresent && !authManager.useExternalLoginPage()) {
-  response.sendRedirect(authManager.getLoginURL(request));
+  if (request.getQueryString() != null) {
+    response.sendRedirect(authManager.getLoginURL(request) + "?" + request.getQueryString());
+  } else {
+    response.sendRedirect(authManager.getLoginURL(request));
+  }
   return;
 }