You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: gocwebtemplate-core/gocwebtemplate-core-jsp/src/main/java/goc/webtemplate/component/jsp/LeaveSecureSiteAction.java
Copy file name to clipboardExpand all lines: gocwebtemplate-sample-jsp/src/main/webapp/samplecontents/leavesecuresitesamplecontent.jsp
+7-38Lines changed: 7 additions & 38 deletions
Original file line number
Diff line number
Diff line change
@@ -17,8 +17,8 @@
17
17
<ul>
18
18
<li>display the message to the user in the form of a modal window</li>
19
19
<li>display the message your application provides</li>
20
-
<li>allow your application to execute any clean up code (ex: close session, gracefully logout user etc...)</li>
21
20
<li>allow your application to exlude any domains from raising the warning</li>
21
+
<li>optionally, allow your application to execute any clean up code (ex: close session, gracefully logout user etc...)</li>
22
22
</ul>
23
23
<h2>How it works</h2>
24
24
<ul>
@@ -29,29 +29,21 @@
29
29
<li>A "Yes" button appears on the window to allow the user to continue with the redirection to the selected link. (Text can be customized, see below.)</li>
30
30
</ul>
31
31
</li>
32
-
<li>if the "Yes" button is clicked:
33
-
<ul>
34
-
<li>the user will first be redirect to the url set in <codeclass="wb-prettify">"leavingSecureSiteRedirectUrl"</code> via either the cdn.properties file or programmatically</li>
35
-
<li>the info of the linked that was clicked is part of the querystring to that url</li>
36
-
<li>in the redirect url provided earlier, attach the preRenderView event to the page and execute a custom bean method to perform the redirect</li>
37
-
<li>execute any clean up code your application requires</li>
38
-
<li>once executed the custom bean class will redirect the user to the url of the clicked link</li>
39
-
<li>the leave secure site feature is already provided by default as part of the GoC Web Template package, by default it will use the templates/leavesecuresiteredirect.xhtml page</li>
40
-
<li>by default the leave secure site redirect page will invoke the <codeclass="wb-prettify">leavesecuresiteredirect.action</code> Struts Action already pre-registered in struts.xml</li>
41
-
</ul>
32
+
<li>if the "Yes" button is clicked, the browser will be directed to the external link</li>
33
+
<li>optionally, a redirect url can be set in <codeclass="wb-prettify">"leavingSecureSiteRedirectUrl"</code> via either the cdn.properties file or programmatically.
34
+
If this is used, the browser will be directed to this page before leaving, where the application can terminate the user's session and let them proceed to the external link.
35
+
The external link will be presented to the user by placing an element <codeclass="wb-prettify"><span class="wb-exitscript wb-exitscript-exiturlparam"></span></code> on the page.
36
+
For an example of a "middle page", refer to <ahref="https://wet-boew.github.io/wet-boew/demos/exitscript/exitscript-en.html#wb-auto-3">scenario 3 link in the WET Documentation</a>.
42
37
</li>
43
38
</ul>
44
39
<p>Here is a local link that will not display the warning: <ahref="basesettingssample.action">Link to Local Page</a></p>
45
-
<p>Here is an external link that will display the warning:<ahref="https://gccode.ssc-spc.gc.ca/iitb-dgiit/sds/GOCWebTemplates/JavaTemplates/wikis/Redirect-Page">Link to External Page</a></p>
40
+
<p>Here is an external link that will display the warning:<ahref="https://github.com/wet-boew/cdts-JavaTemplates/wiki/Redirect-Page">Link to External Page</a></p>
46
41
<h2>Steps to implement:</h2>
47
42
<h3>Enable the leaving secure site feature</h3>
48
43
<ul>
49
44
<li>Set, via the cdn.properties file or programmatically in your custom bean class, <codeclass="wb-prettify">"Enabled"</code> to <strong>"true"</strong></li>
50
45
<li>Provide the message to be displayed by setting the <codeclass="wb-prettify">"Message"</code> programmatically via the <codeclass="wb-prettify">setLeavingSecureSiteWarning</code> method in your custom bean class.</li>
51
-
<li>Set, via the cdn.properties file or programmatically in your custom bean class, <codeclass="wb-prettify">"RedirectUrl"</code> to your action class which will execute your clean up code and then redirect to the selected url.</li>
52
46
<li>Set, via the cdn.properties or programmatically in your custom bean class, <codeclass="wb-prettify">"ExcludedDomain"</code> the list of domains you do not want to raise the warning</li>
53
-
<li>Optionally, provide a cancel message by setting the <codeclass="wb-prettify">"CancelMessage"</code> programmatically via the <codeclass="wb-prettify">setLeavingSecureSiteWarning</code> method in your custom bean class.</li>
54
-
<li>Optionally, provide a yes message by setting the <codeclass="wb-prettify">"YesMessage"</code> programmatically via the <codeclass="wb-prettify">setLeavingSecureSiteWarning</code> method in your custom bean class.</li>
55
47
</ul>
56
48
<divclass="wb-prettify all-pre lang-vb linenums">
57
49
<pre>
@@ -62,7 +54,6 @@ public void onWebTemplateInitialize() {
62
54
63
55
lssw.setEnabled(true);
64
56
lssw.setMessage("You are about to leave a secure site, do you wish to continue?");
Copy file name to clipboardExpand all lines: gocwebtemplate-sample-spring/src/main/resources/samples/LeavingSecureSiteSample.html
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -36,11 +36,11 @@ <h2>How it works</h2>
36
36
<li>optionally, a redirect url can be set in <codeclass="wb-prettify">"leavingSecureSiteRedirectUrl"</code> via either the cdn.properties file or programmatically.
37
37
If this is used, the browser will be directed to this page before leaving, where the application can terminate the user's session and let them proceed to the external link.
38
38
The external link will be presented to the user by placing an element <codeclass="wb-prettify"><span class="wb-exitscript wb-exitscript-exiturlparam"></span></code> on the page.
39
-
An example of "middle page" is available in the <ahref="https://wet-boew.github.io/wet-boew/docs/ref/exitscript/exiturl-en.html?exturl=http%3A%2F%2Fcsszengarden.com%2F219">WET Documentation</a>.
39
+
For an example of a "middle page", refer to <ahref="https://wet-boew.github.io/wet-boew/demos/exitscript/exitscript-en.html#wb-auto-3">scenario 3 link in the WET Documentation</a>.
40
40
</li>
41
41
</ul>
42
42
<p>Here is a local link that will not display the warning: <ahref="BaseSettingsSample">Link to Local Page</a></p>
43
-
<p>Here is an external link that will display the warning: <ahref="https://gccode.ssc-spc.gc.ca/iitb-dgiit/sds/GOCWebTemplates/JavaTemplates/wikis/Redirect-Page">Link to External Page</a></p>
43
+
<p>Here is an external link that will display the warning: <ahref="https://github.com/wet-boew/cdts-JavaTemplates/wiki/Redirect-Page">Link to External Page</a></p>
0 commit comments