<!-- Enhydra Java Application Server Copyright 1997-1999 Lutris Technologies, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. All advertising materials mentioning features or use of this software must display the following acknowledgement: This product includes Enhydra software developed by Lutris Technologies, Inc. and its contributors. 4. Neither the name of Lutris Technologies nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY LUTRIS TECHNOLOGIES AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL LUTRIS TECHNOLOGIES OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --> <JDDI JAVAIMPORT> import java.net.URLEncoder; </JDDI> <JDDI INCLUDE="../jinc/Setup.jinc"></JDDI> <JDDI JAVADEF> public void loginSetup(JoltPage page) throws Exception { /** * Set loginMsg JDDI Field to required login message. This is * either a default login message or an error message. * * Set extraArgs JDDI Field to be any additional cgi arguments * that need to be passed back to this page if it is refreshed. * An example is when the help or debug buttons are pressed. */ String loginMsg = "Use any username, and the password \"demo\":"; String errorMsg = page.data.getString("cgiArgs.errorMsg"); if (errorMsg != null) { loginMsg = errorMsg; page.data.set("extraArgs", "&errorMsg=" + URLEncoder.encode(errorMsg)); page.data.set("displayBang", "true"); } else { page.data.set("extraArgs", ""); } page.data.set("loginMsg", loginMsg); } </JDDI> <JDDI JAVACALL=loginSetup></JDDI> <HTML> <HEAD> <TITLE>JDDI HTML Example: User Login</TITLE> </HEAD> <JDDI INCLUDE="../jinc/Header.jinc"></JDDI> <BODY> <CENTER> <B><FONT FACE="Arial,Helvetica" SIZE=+3> User Login </FONT></B> </CENTER> </BODY> <JDDI INCLUDE="../jinc/Buttons.jinc"></JDDI> <BODY> <BR> <CENTER> <TABLE COLS=1 WIDTH="60%"> <TR> <TD> <FONT FACE="Arial,Helvetica" SIZE=+1> The Login page is the gateway into the Enhydra Demonstration Application. Users are authenticated via this page prior to gaining access to the available business applications. </FONT> </TD> </TR> </TABLE> </CENTER> <JDDI HTML IFEQ FIELD=cgiArgs.help VALUE="on"> <CENTER> <TABLE COLS=1 WIDTH="40%" > <TR> <TD> <FONT FACE="Arial,Helvetica" COLOR=red><BR> Please be aware that you will be logged off if you are idle for more than 20 minutes. You will be returned to this page to re-login if you get logged off and then try to access any of the demonstration applications. The idle time is configurable in the DemoApp.conf file. </FONT> </TD> </TR> </TABLE> </CENTER> </JDDI> <BR><IMG SRC="../media/userLogin.gif" WIDTH=600 HEIGHT=50> <JDDI HTML IFEQ FIELD=cgiArgs.help VALUE="on"> <CENTER> <TABLE COLS=1 WIDTH="40%" > <TR> <TD> <FONT FACE="Arial,Helvetica" COLOR=red> You can use any name as the Username. Please use "demo" as the Password. </FONT> <IMG SRC="../media/arrow.gif" BORDER=0 ANCHOR=BOTTOM ALIGN=LEFT> </TD> </TR> </TABLE> </CENTER> </JDDI> <FORM METHOD=POST ACTION="LoginProcessor.po"> <JDDI HTML IFEQ FIELD=displayBang VALUE="true"> <FONT SIZE=+3><B>!</B></FONT> </JDDI> <FONT FACE=\"Arial,Helvetica\" SIZE=+1>(@loginMsg@)<P> <TABLE WIDTH=600> <TR> <TD ALIGN=RIGHT><B><FONT FACE=\"Arial,Helvetica\">Username:</B></TD> <TD><INPUT TYPE=TEXT SIZE=20 NAME=username></TD> </TR> <TR> <TD ALIGN=RIGHT><B><FONT FACE=\"Arial,Helvetica\">Password:</B></TD> <TD><INPUT TYPE=PASSWORD SIZE=20 NAME=password></TD> <INPUT TYPE="hidden" NAME=debug VALUE=(@cgiArgs.debug@)> <INPUT TYPE="hidden" NAME=help VALUE=(@cgiArgs.help@)> </TR> <TR> <TD COLSPAN=2 ALIGN=CENTER><BR><INPUT TYPE=SUBMIT VALUE=Submit></TD> </TR> </TABLE> </FONT> </FORM> <JDDI INCLUDE="../jinc/VerboseDebug.jinc"></JDDI> </BODY> </HTML>