Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Beginnings of the master single page application.
Self review
- Loading branch information
1 parent
61178e8
commit 852c5c3
Showing
4 changed files
with
65 additions
and
1 deletion.
There are no files selected for viewing
33 changes: 33 additions & 0 deletions
33
web/src/main/java/org/openmrs/web/SinglePageApplicationServlet.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/** | ||
* This Source Code Form is subject to the terms of the Mozilla Public License, | ||
* v. 2.0. If a copy of the MPL was not distributed with this file, You can | ||
* obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under | ||
* the terms of the Healthcare Disclaimer located at http://openmrs.org/license. | ||
* | ||
* Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS | ||
* graphic logo is a trademark of OpenMRS Inc. | ||
*/ | ||
package org.openmrs.web; | ||
|
||
import javax.servlet.RequestDispatcher; | ||
import javax.servlet.http.HttpServlet; | ||
import javax.servlet.http.HttpServletRequest; | ||
import javax.servlet.http.HttpServletResponse; | ||
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
|
||
public class SinglePageApplicationServlet extends HttpServlet { | ||
|
||
private static final Logger log = LoggerFactory.getLogger(SinglePageApplicationServlet.class); | ||
|
||
@Override | ||
protected void doGet(HttpServletRequest request, HttpServletResponse response) { | ||
try { | ||
RequestDispatcher dispatcher = request.getRequestDispatcher("/master-single-page-application.jsp"); | ||
dispatcher.forward(request, response); | ||
} catch (Exception e) { | ||
response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR); | ||
this.log.error("Failed to render GSP for master-single-page-application", e); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
*.jsp | ||
/*.css | ||
/*.js | ||
|
||
!master-single-page-application.jsp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<title>Open MRS</title> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<meta name="importmap-type" content="systemjs-importmap"> | ||
<link rel="preload" href="${cookie['import-map-override-url'] == null ? 'import-map.json' : cookie['import-map-override-url'].getValue()}" as="script" crossorigin="anonymous" /> | ||
<script type='systemjs-importmap' src="${cookie['import-map-override-url'] == null ? 'import-map.json' : cookie['import-map-override-url'].getValue()}"></script> | ||
<script src="https://unpkg.com/import-map-overrides@1.5.0/dist/import-map-overrides.js"></script> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/systemjs/3.1.6/system.min.js"></script> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/systemjs/3.1.6/extras/amd.min.js"></script> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/systemjs/3.1.6/extras/named-exports.js"></script> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/systemjs/3.1.6/extras/named-register.min.js"></script> | ||
<script> | ||
System.import("@openmrs/root-config") | ||
</script> | ||
</head> | ||
<body> | ||
</body> | ||
</html> |