This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Last revision Both sides next revision | ||
web-integration:java-example [2019/08/15 06:08] 740803864 [Web Application Configuration File] |
web-integration:java-example [2019/08/15 06:49] 740803864 [Web Application Configuration File] |
||
---|---|---|---|
Line 157: | Line 157: | ||
Some notes to source code: | Some notes to source code: | ||
* way to get '' | * way to get '' | ||
- | ==== Web Application Configuration File ==== | + | |
- | This file is required by Servlet API. This file provides | + | ===== Web Integration ===== |
+ | |||
+ | ==== Start Page ==== | ||
+ | |||
+ | Servlets described earlier are used in '' | ||
+ | |||
+ | <code javascript> | ||
+ | <html xmlns=" | ||
+ | |||
+ | < | ||
+ | <script type=" | ||
+ | <script type=" | ||
+ | |||
+ | <script type=" | ||
+ | var aducid = new ADUCID(); | ||
+ | $(document).ready(function() { | ||
+ | aducid.setAuthentication(); | ||
+ | |||
+ | aducid.setStartOperationUrl(" | ||
+ | aducid.setResultOperationUrl(" | ||
+ | aducid.setProxyUrl(" | ||
+ | |||
+ | aducid.processResult = function(result) { | ||
+ | if (result.status == " | ||
+ | alert(" | ||
+ | location.href = result.redirect; | ||
+ | } else { | ||
+ | alert(" | ||
+ | location.href = result.redirect; | ||
+ | } | ||
+ | } | ||
+ | |||
+ | // handle PEIG not installed error | ||
+ | aducid.showPeigError = function() { | ||
+ | alert(" | ||
+ | } | ||
+ | |||
+ | // handle communication or other error | ||
+ | aducid.handleError = function(e) { | ||
+ | alert(e.data.message); | ||
+ | } | ||
+ | |||
+ | aducid.showQRHint = function(param) { | ||
+ | $('# | ||
+ | } | ||
+ | |||
+ | aducid.showRunningHint = function(param) { | ||
+ | $('# | ||
+ | }; | ||
+ | |||
+ | aducid.startAnimation = function() { | ||
+ | $("# | ||
+ | }; | ||
+ | |||
+ | aducid.stopRunningAnimation = function() { | ||
+ | $("# | ||
+ | }; | ||
+ | |||
+ | // GUI mapping | ||
+ | aducid.setButton($("# | ||
+ | aducid.setQrCode($("# | ||
+ | aducid.setQrHint($("# | ||
+ | |||
+ | // start | ||
+ | aducid.init(); | ||
+ | }); | ||
+ | </ | ||
+ | </ | ||
+ | < | ||
+ | |||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | <img id=" | ||
+ | <div id=" | ||
+ | |||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | ==== Result Page ==== | ||
+ | |||
+ | After successful authentication, | ||
+ | |||
+ | <code javascript> | ||
+ | <html xmlns=" | ||
+ | |||
+ | < | ||
+ | </ | ||
+ | < | ||
+ | |||
+ | < | ||
+ | UDI: ${result.userDatabaseIndex} | ||
+ | < | ||
+ | <a href=" | ||
+ | |||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | ===== Web Application Configuration File ===== | ||
+ | This file is required by Servlet API. File provides '' | ||
<code xml> | <code xml> | ||
Line 180: | Line 281: | ||
</ | </ | ||
- | Value '' | + | Value '' |
+ | |||
+ | ===== Maven Configuration File ===== | ||
+ | |||
+ | Maven configuration file contents definition of plugin to generate WS classes and instruction to filter '' | ||
+ | |||
+ | <code xml> | ||
+ | <?xml version=" | ||
+ | <project xmlns=" | ||
+ | xsi: | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | </ | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | < | ||
+ | </ | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | </ | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | ===== Building Application ===== | ||
+ | |||
+ | There is prepared batch file '' | ||
+ | |||
+ | < | ||
+ | set MAVEN_OPTS=" | ||
+ | mvn -Dws.url=https:// | ||
+ | </ | ||