AquaLogic User Interaction Development Guide

     Previous Next  Open TOC in new window   View as PDF - New Window  Get Adobe Reader - New Window
Content starts here

Creating a Custom Ensemble Post-Login Page

The post-login page is an interstitial page that can be used to display messages or gather input from the user after the login form is submitted.

The example below (interstitialpage.jsp) displays a user agreement that requires approval. This page uses adaptive tags to display errors and form elements.

 <%@page contentType="text/html;charset=UTF-8"%>
<HTML>
<BODY>
<SPAN xmlns:pt='http://www.plumtree.com/xmlschemas/ptui/'>
<FORM action="./processinterstitialpage.jsp" method="POST">
<P>
<TABLE>
<TR>
<TD><CENTER><B><pt:logic.value pt:value="$#3.ptmsgs_samples"/></B></CENTER>
</TD></TR>
<TR>
   <TD>
   <TEXTAREA name="thetext" rows="15" cols="80">
   Owner: This web site belongs to Sample Company United States, Inc. Sample Company may change or terminate this web site or any parts thereof.
   Agreement: Your use of this web site constitutes your agreement with Sample Company to operate under the auspices of, and to act in
   concordance with, these Terms and Conditions of use.  By clicking "Agree" below, you are confirming your agreement, which will also be confirmed 
   by merely accessing this web site beyond this page.
   Continuing Agreement: Sample Company may modify or alter these Usage Terms at any time.  Further usage of this web site after the terms have 
   been modified confirms your agreement with the modified Usage Terms.
   Use of Materials: Sample Company owns all of the data on this web site or has secured permission from a third party to use the material. Usage of
   this material in any way outside this web site is strictly prohibited.
   </TEXTAREA>

    <pt:common.error> 
    <P>
    <B><FONT color="red"><pt:logic.value pt:value="$#10.ptmsgs_login"/></FONT>:</B>
    <pt:common.errortext/>  
    </P>
    </pt:common.error>

    <P> 
    <pt:core.html pt:tag="input" type="checkbox" name="agreement" alt="$#0.ptmsgs_samples" value="agree"/>
    <pt:logic.value pt:value="$#1.ptmsgs_samples"/> &nbsp;&nbsp;&nbsp;&nbsp;
    <pt:core.html pt:tag="input" type="submit" value="$#2.ptmsgs_samples"/>
    </P>
    </TD>
</TR>
</TABLE></SPAN></BODY></HTML>

When the user clicks the submit button, the processing page (processinterstitialpage.jsp) sets the runner_post_interstitial_complete header to true, which directs the browser to the resource. If the user did not select Accept on the post-login page, a message is displayed including a link back to the agreement. This file also provides error text for the error page in case processing fails.

<%@page contentType="text/html;charset=UTF-8"%>
<HTML>
<BODY>
<SPAN xmlns:pt='http://www.plumtree.com/xmlschemas/ptui/'>
<pt:common.error> 
<P>
<B><FONT color="red"><pt:logic.value pt:value="$#10.ptmsgs_login"/></FONT>:</B>
<pt:common.errortext/>  
</P>
</pt:common.error>

<%
if (request.getParameter( "agreement" ) != null)
{
   out.println( "<P>Ensemble post-login interstitial page processing login completion error. 
   Contact your system administrator.</P>");
   response.addHeader( "runner_post_interstitial_complete", "true");
   session.invalidate();
}
else
{
    out.println( "<P>If you do not consent to the web site usage agreement, you will not be able to access any content.</P>");
    out.println( "<P>Click <A href=\"./interstitialpage.jsp\">here</a> to view the usage agreement again, or ");
    out.println( "you can use <A href=\"http://www.google.com\">Google</a> to find another web site.</P>");
}
%>
</SPAN></BODY></HTML>

  Back to Top      Previous Next