src/index.jsp
author Asier Lostalé <asier.lostale@openbravo.com>
Mon, 07 Mar 2011 09:37:30 +0100
changeset 11064 fc7ec1644bf0
parent 10938 d435b356c0aa
child 11074 58ba45ebdd36
permissions -rw-r--r--
fixed bug 15870: Do not include same module more than once

When packaging module in obx file, it is checked the same module is not included
more than once.
ivan@10243
     1
<%@ page import="java.util.Properties" %>
ivan@10243
     2
<%@ page import="org.openbravo.base.HttpBaseServlet" %>
ivan@10243
     3
<%@ page import="org.openbravo.base.util.OBClassLoader" %>
ivan@10243
     4
<%@ page import="org.openbravo.base.session.OBPropertiesProvider" %>
ivan@10243
     5
<%@ page import="org.openbravo.authentication.AuthenticationManager" %>
ivan@10243
     6
<%@ page contentType="text/html; charset=UTF-8" %>
ivan@10243
     7
<%
ivan@10243
     8
/*
ivan@10243
     9
 *************************************************************************
ivan@10243
    10
 * The contents of this file are subject to the Openbravo  Public  License
ivan@10243
    11
 * Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
ivan@10243
    12
 * Version 1.1  with a permitted attribution clause; you may not  use this
ivan@10243
    13
 * file except in compliance with the License. You  may  obtain  a copy of
ivan@10243
    14
 * the License at http://www.openbravo.com/legal/license.html 
ivan@10243
    15
 * Software distributed under the License  is  distributed  on  an "AS IS"
ivan@10243
    16
 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
ivan@10243
    17
 * License for the specific  language  governing  rights  and  limitations
ivan@10243
    18
 * under the License. 
ivan@10243
    19
 * The Original Code is Openbravo ERP. 
ivan@10243
    20
 * The Initial Developer of the Original Code is Openbravo SLU 
ivan@10243
    21
 * All portions are Copyright (C) 2011 Openbravo SLU
ivan@10243
    22
 * All Rights Reserved. 
ivan@10243
    23
 * Contributor(s):  ______________________________________.
ivan@10243
    24
 ************************************************************************
ivan@10243
    25
 */
ivan@10243
    26
 
ivan@10243
    27
Properties obProperties = OBPropertiesProvider.getInstance().getOpenbravoProperties();
ivan@10243
    28
String authClass = obProperties.getProperty("authentication.class");
ivan@10243
    29
ivan@10243
    30
if(authClass == null || authClass.equals("")) {
ivan@10243
    31
  authClass = "org.openbravo.authentication.basic.DefaultAuthenticationManager";
ivan@10243
    32
}
ivan@10243
    33
ivan@10243
    34
AuthenticationManager authManager = (AuthenticationManager) OBClassLoader.getInstance().loadClass(authClass).newInstance();
ivan@10243
    35
ivan@10243
    36
HttpBaseServlet s = new HttpBaseServlet(); // required for ConnectionProvider
ivan@10243
    37
s.init(getServletConfig());
ivan@10243
    38
s.initialize(request, response);
ivan@10243
    39
ivan@10243
    40
authManager.init(s);
ivan@10243
    41
ivan@10243
    42
String userId = authManager.authenticate(request, response);
ivan@10243
    43
if(userId == null){
ivan@10243
    44
  return;
ivan@10243
    45
}
ivan@10243
    46
%>
ivan@10243
    47
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
ivan@10243
    48
        "http://www.w3.org/TR/html4/loose.dtd">
ivan@10243
    49
ivan@10243
    50
<html>
david@10938
    51
<head>
david@10938
    52
<meta http-equiv="X-UA-Compatible" content="IE=7">
ivan@10243
    53
<meta http-equiv="Expires" content="Tue, 24 Apr 1979 00:00:01 GMT"/>
ivan@10243
    54
<meta http-equiv="Content-type" content="text/html;charset=utf-8"/>
ivan@10243
    55
<meta http-equiv="Pragma" content="no-cache" >
ivan@10243
    56
<meta name="author" content="Openbravo S.L.U.">
ivan@10243
    57
<meta name="keywords" content="openbravo">
ivan@10243
    58
<meta name="description" content="Openbravo S.L.U.">
ivan@10257
    59
<link rel="shortcut icon" href="./web/images/favicon.ico" />
ivan@10243
    60
<link rel="stylesheet" type="text/css" href="./org.openbravo.client.kernel/OBCLKER_Kernel/StyleSheetResources?_mode=3.00&&_skinVersion=3.00"/>
ivan@10243
    61
<title>Openbravo</title>
ivan@10243
    62
<script type="text/javascript" src="./web/org.openbravo.client.kernel/js/LAB.min.js"></script>
ivan@10243
    63
<!-- styles used during loading -->
ivan@10243
    64
<style type="text/css">
ivan@10243
    65
  html, body {
ivan@10243
    66
      height: 100%;
ivan@10243
    67
      width: 100%;
ivan@10243
    68
  }
ivan@10243
    69
ivan@10243
    70
  .OBCenteredBox {
ivan@10243
    71
      position: fixed;
ivan@10243
    72
      z-index: 1000000;
ivan@10243
    73
      top: 50%;
ivan@10243
    74
      left: 50%;
ivan@10243
    75
      margin: -25px 0 0 -150px;
ivan@10243
    76
      width: 300px;
ivan@10243
    77
      height: 50px;
ivan@10243
    78
  }
ivan@10243
    79
ivan@10243
    80
  .OBLoadingPromptLabel {
ivan@10243
    81
      font-family: 'Arial';
ivan@10243
    82
      font-size: 12px;
ivan@10243
    83
      color: #ccd0d4;
ivan@10243
    84
  }
ivan@10243
    85
ivan@10243
    86
  .OBLoadingPromptModalMask {
ivan@10243
    87
      left: 0;
ivan@10243
    88
      top: 0;
ivan@10243
    89
      width: 100%;
ivan@10243
    90
      height: 100%;
ivan@10243
    91
      background-color: #7f7f7f;
ivan@10243
    92
  }
ivan@10243
    93
</style>
ivan@10243
    94
ivan@10243
    95
</head>
ivan@10243
    96
<body>
ivan@10243
    97
ivan@10243
    98
<!-- shows the loading div -->
ivan@10243
    99
<div class="OBLoadingPromptModalMask" id="OBLoadingDiv">
ivan@10243
   100
    <div class="OBCenteredBox">
ivan@10243
   101
        <table>
ivan@10243
   102
            <tr>
ivan@10243
   103
                <td>
ivan@10243
   104
                    <span class="OBLoadingPromptLabel">LOADING...</span>
ivan@10243
   105
                </td>
ivan@10243
   106
                <td>
ivan@10243
   107
                    <img width="220" height="16" src="./web/org.openbravo.userinterface.smartclient/openbravo/skins/3.00/org.openbravo.client.application/images/system/windowLoading.gif"/>
ivan@10243
   108
                </td>
ivan@10243
   109
            </tr>
ivan@10243
   110
        </table>
ivan@10243
   111
    </div>
ivan@10243
   112
</div>
ivan@10243
   113
<!-- load the rest -->
ivan@10243
   114
<script type="text/javascript">
ivan@10392
   115
$LAB.setGlobalDefaults({AppendTo: 'body'});
ivan@10243
   116
ivan@10243
   117
var isomorphicDir='./web/org.openbravo.userinterface.smartclient/isomorphic/';
ivan@10243
   118
ivan@10243
   119
// starts the application is called as the last statement in the StaticResources part
ivan@10243
   120
function OBStartApplication() {
ivan@10243
   121
  OB.Layout.draw();
ivan@10243
   122
  OB.Layout.ViewManager.createAddStartTab();
ivan@10243
   123
  // get rid of the loading stuff
ivan@10243
   124
  document.body.removeChild(document.getElementById('OBLoadingDiv'));
ivan@10243
   125
  OB.GlobalHiddenForm = document.forms.OBGlobalHiddenForm;
ivan@10243
   126
}
ivan@10243
   127
</script>
ivan@10243
   128
<script type="text/javascript" src="./web/org.openbravo.userinterface.smartclient/isomorphic/ISC_Combined.js"></script>
ivan@10243
   129
<script type="text/javascript" src="./web/org.openbravo.userinterface.smartclient/isomorphic/ISC_History.js"></script>
ivan@10243
   130
<script type="text/javascript" src="./org.openbravo.client.kernel/OBCLKER_Kernel/StaticResources?_mode=3.00&_skinVersion=3.00"></script>
ivan@10243
   131
<form name="OBGlobalHiddenForm" method="post" action="blank.html"></form>
ivan@10243
   132
</body>
ivan@10243
   133
</html>