System I (AS400) Login You will need to develop Login procedures for your web applications. This short section describes how to do this for System I.

Slides:



Advertisements
Similar presentations
WEB DESIGN TABLES, PAGE LAYOUT AND FORMS. Page Layout Page Layout is an important part of web design Why do you think your page layout is important?
Advertisements

® IBM Software Group © 2006 IBM Corporation How to create Popup Pages using EGL/JSF This Learning Module shows how to utilize the RBDe tooling to create.
Simple Java Forms Dr. Robert L. Probert S.I.T.E., University of Ottawa.
FrontPage Express By John G. Summerville Ph.D.©, RN.
X-Media V2.0 Healthcare Training Jayex Technology Limited X-Media V2.0 March 2010 v
® IBM Software Group © 2006 IBM Corporation JSF dataTables – Basic Properties and Development Techniques Part I – of a 3-part section on the use of the.
® IBM Software Group © 2006 IBM Corporation Securing Your Application With WebSphere Security You will need to develop Login procedures for your web applications.
® IBM Software Group © 2006 IBM Corporation Additional AJAX Examples and Workshops This learning module provides additional AJAX use cases and examples.
Computer Science 101 Web Access to Databases Overview of Web Access to Databases.
® IBM Software Group © 2006 IBM Corporation JSF dataTables – Advanced use of Properties and Development Techniques Part III – of a 3-part section on the.
® IBM Software Group © 2006 IBM Corporation JSF Menu Component How to create and use JSF Menu components to add custom static and programmatic (dynamic)
Web Development & Design Foundations with XHTML Chapter 9 Key Concepts.
® IBM Software Group © 2006 IBM Corporation How to read/write XML using EGL This Learning Module shows how to utilize an EGL Library to read/write an XML.
® IBM Software Group © 2006 IBM Corporation JSF Tab Controls This Learning Module shows how to develop server-side EGL applications with dynamic content.
® IBM Software Group © 2006 IBM Corporation Display contents of a Data Table in Excel right from the browser – No POI needed This section describes how.
® IBM Software Group © 2006 IBM Corporation Creating JSF/EGL Template Pages This section describes how to create.JTPL (Java Template Pages) using the Page.
® IBM Software Group © 2006 IBM Corporation JavaScript – and EGL and.JSP Pages This learning module describes the use of JavaScript in your EGL and.JSP.
Copyright © Texas Education Agency, All rights reserved. 1 Web Technologies Website Development with Dreamweaver.
Session 5: Working with MySQL iNET Academy Open Source Web Development.
® IBM Software Group © 2006 IBM Corporation JSF Tree Control This Learning Module describes the use of the JSF Tree Control – for hierarchical organization.
® IBM Software Group © 2006 IBM Corporation EGL Programming – Data Parts and Assignment Statements – 4 – Arrays These slides walk you through the terms.
Web Technologies Website Development Trade & Industrial Education
® IBM Software Group © 2006 IBM Corporation Web JSF Overview – Dynamic Content Web Pages – for EGL/JSF Developers This unit introduces you to the technical.
Java: Chapter 1 Computer Systems Computer Programming II.
SharePoint You must use Internet Explorer Single click only on links and buttons There are two handouts 1.Importing a Web Part into SharePoint 2.Adding.
Creating a Web Site to Gather Data and Conduct Research.
Using FrontPage Express. Slide 1 Standard toolbars and menus Time indicator: gives an approximation of download time of the page.
Web Programming: Client/Server Applications Server sends the web pages to the client. –built into Visual Studio for development purposes Client displays.
Website Development with Dreamweaver
® IBM Software Group © 2006 IBM Corporation Programmatically Rendering and Hiding JSF Controls This section describes how to hide and show JSF controls.
1 Data Bound Controls II Chapter Objectives You will be able to Use a Data Source control to get data from a SQL database and make it available.
Introducing: Dreamweaver!. Today We’ll Learn… Organizing Folders Organizing Folders Opening Dreamweaver Opening Dreamweaver Titles and Saving Titles and.
Extending HTML CPSC 120 Principles of Computer Science April 9, 2012.
JavaScript, Fourth Edition Chapter 5 Validating Form Data with JavaScript.
WESS Application System PKI Login Registration Process.
Language Club KompoZer Design View. Files you will need  Images  pages  Templates  Text.
® IBM Software Group © 2006 IBM Corporation.JSP Page Flow – and Managing State in your Web Application This learning module covers the salient features.
® IBM Software Group © 2006 IBM Corporation JSF Progress Bar This Learning Module shows how to integrate EGL/JSF functionality into a run-time progress.
LEARNING HTML PowerPoint #1 Cyrus Saadat, Webmaster.
Java server pages. A JSP file basically contains HTML, but with embedded JSP tags with snippets of Java code inside them. A JSP file basically contains.
® IBM Software Group © 2006 IBM Corporation Individual Cell Coloring – in a JSF dataTable Control You may need to programmatically (using EGL) change the.
® IBM Software Group © 2006 IBM Corporation Using JSF Mini-Calendar Controls This section describes how to use a JSF Mini-Calendar Control with EGL It.
® IBM Software Group © 2006 IBM Corporation JSF File Upload Control This Learning Module describes the use of the JSF File Upload component – for allowing.
® IBM Software Group © 2006 IBM Corporation “Essential” JSF Components and EGL Bindings This Learning Module describes the foundation terms and concepts.
® IBM Software Group © 2006 IBM Corporation Finding Out Which Submit Button Was Clicked – and Other JSF Command Button Techniques This section describes.
® IBM Software Group © 2006 IBM Corporation JSF Panel – Section Controls This Learning Module shows how to develop server-side EGL applications with dynamic.
1 Web Programming with Servlets & JSP ASSIGNMENT GUIDELINE.
® IBM Software Group © 2006 IBM Corporation JSF Rich Text Area Component This Learning Module describes the use of the JSF Rich Text Area component – for.
Chapter 12© copyright Janson Industries Java Server Faces ▮ Explain the JSF framework ▮ SDO (service data objects) ▮ Facelets ▮ Pagecode classes.
Using ADO.Net to Build a Login System Dr. Ron Eaglin.
® IBM Software Group © 2006 IBM Corporation Dependent Combo-Box U.I. Development This Learning Module walks you through the options and development techniques.
10 Copyright © 2004, Oracle. All rights reserved. Building ADF View Components.
CSD 340 (Blum)1 Introducing Text Input elements and Ifs.
Weebly is Your Friend. * To Enhance And Promote Your Curriculum * To Provide A Student Resource * Add Efficiency to Your Planning * Informational * Promote.
® IBM Software Group © 2006 IBM Corporation EGL.CSV (Excel) File Reading and Writing This section describes how to access.CSV (Excel Spreadsheet) files.
1 © 2008 IBM Corporation Topic EGL Calls to Remote Programs (Overview)  EGL Calls to Remote Programs (Overview)  Calling RPG program  Calling a CL program.
® IBM Software Group © 2006 IBM Corporation Create EGL/JSF HelloWorld Pages This learning module walks you through the process of creating two simple “hello.
WESS Application System PKI Login Registration Process
Chapter 5 Validating Form Data with JavaScript
Journal of Mountain Science (JMS)
DreamWeaver CS4.
Unit I: Collecting Data with Forms
Unit 27 - Web Server Scripting
WESS Application System PKI Login Registration Process
Nov 5th Inservice.
System I (AS400) Login You will need to develop Login procedures for your web applications. This short section describes how to do this for System I.
WESS Application System PKI Login Registration Process
WESS Application System PKI Login Registration Process
Dynamically Populating a Multiple Selection List Box
WESS Application System PKI Login Registration Process
Presentation transcript:

System I (AS400) Login You will need to develop Login procedures for your web applications. This short section describes how to do this for System I machines.

 System I Login Resources To develop your Login procedure, you will need the following: Login Page Java Class to authenticate through an AS400Object Success failure logic This workshop will describe all of these resources. You can find a complete, working PIF solution in the attachments: As400authentication.zip EGL JSFHandler Function authenticate() Call to Java Class If successful forward to next page… AS400Authenticate (Java Class) Create new AS400Object Invoke Authenticate Method Return success/failure indicator

 System I Login Resources – Java Class In the src folder, create a new Java package, named: as400Security Then create a new Java Class, named: AS400Authentication Note that this snapshot is taken from a different project and workspace. You can add the resources into EGLWeb As long as the Java package and class names match package as400Security; import java.io.IOException; import com.ibm.as400.access.AS400; import com.ibm.as400.access.AS400SecurityException; /**@author sanjay chandru */ public class AS400Authentication { static AS400 as400Object; public static void setSystemName(String systemName) { as400Object = new AS400(systemName); } public static int authenticate(String username, String password) int intValue = 0; boolean returnValue = false; try returnValue = as400Object.authenticate(username, password); catch (AS400SecurityException ex1) intValue = 0; catch (IOException ex2) if (returnValue) intValue = 1; return intValue; public static String getUserId() return as400Object.getUserId();

 System I Login Resources – Login Page – EGL Code In the \WebContent\ folder, create a new Web page named: TestSecurity.JSP From the page’s EGL code, add the statements in the Notes section of this slide. Study the comments – in particular, note: externalType declaration Call through externalType to Java class for AS400 authentication // Nov 19, 2007 11:25:33 AM - EGL V7.0 Migration package jsfhandlers; import com.ibm.egl.jsf.UIViewRoot; handler TestSecurity type JSFHandler {onConstructionFunction = onPageLoad, view = "TestSecurity.jsp", viewRootVar = viewRoot, cancelOnPageTransition = YES} password string; //Logon Password username string; //Logon ID aS400 AS400Authentication; //ExternalType to a Java Class for authentication //Note that the Java Class is: AS400Authentication.java viewRoot UIViewRoot; //used for JSF Component Tree access Function onPageLoad() //syslib.setRemoteUser ("EGL4RPG", "EGL4YOU" ); //Login to the iSeries //iseriesd.dfw.ibm.com End function authenticate() rc int; //Return code for authentication call forwardLabel string; //Next page //assign the name of your host System i machine (ping-able) address aS400.setSystemName("iseriesd.dfw.ibm.com"); //Call the Java Class through the as400 ExternalType, passing UID/PWD rc = aS400.authenticate(username, password); if (rc == 0) //0 is a bad return code from the System i setError("Invalid User"); else forwardLabel = "NextPage"; forward to forwardLabel; //You are logged in end externalType AS400Authentication type JavaObject {JavaName = "AS400Authentication", PackageName = "as400Security"} static function setSystemName (systemName string in); static function authenticate (username string in, password string in) returns (int);

 System I Login Resources – Login Page – JSP Page From Page Designer: Create a page header (Login Page) Drag an HTML Table on to the page. Make it: 1 row/1 column/100% width From the Table’s properties, Horizontally align the row: Center From Page Data: Drag the UserName and PassWord fields onto the page Make them both input fields Drag the authenticate() function on to the page – where it will become a Submit Button From Page Designer Feel free to change the table’s color (the picture above, uses a custom color: #ddaaaa To add a true password field: Select and delete the default password control From the Enhanced Faces (JSF) Components drawer, drag an: Input – Password control into the table From Page Data, drag and drop the password field on top of the input – Password JSF control // Nov 19, 2007 11:25:33 AM - EGL V7.0 Migration package jsfhandlers; import com.ibm.egl.jsf.UIViewRoot; handler TestSecurity type JSFHandler {onConstructionFunction = onPageLoad, view = "TestSecurity.jsp", viewRootVar = viewRoot, cancelOnPageTransition = YES} password string; //Logon Password username string; //Logon ID aS400 AS400Authentication; //ExternalType to a Java Class for authentication //Note that the Java Class is: AS400Authentication.java viewRoot UIViewRoot; //used for JSF Component Tree access Function onPageLoad() //syslib.setRemoteUser ("EGL4RPG", "EGL4YOU" ); //Login to the iSeries //iseriesd.dfw.ibm.com End function authenticate() rc int; //Return code for authentication call forwardLabel string; //Next page //assign the name of your host System i machine (ping-able) address aS400.setSystemName("iseriesd.dfw.ibm.com"); //Call the Java Class through the as400 ExternalType, passing UID/PWD rc = aS400.authenticate(username, password); if (rc == 0) //0 is a bad return code from the System i setError("Invalid User"); else forwardLabel = "NextPage"; forward to forwardLabel; //You are logged in end externalType AS400Authentication type JavaObject {JavaName = "AS400Authentication", PackageName = "as400Security"} static function setSystemName (systemName string in); static function authenticate (username string in, password string in) returns (int);

 System I Login Resources – Next Page From the \WebContent\ folder, create a new page named: NextPage.jsp Using Page Designer: Add any page heading text, or image you’d like  Here we’ve saved an image from the IBM site into our project (\WebContent\ folder), and dragged it on to the page. From Project Explorer Right-click over TestSecurity.JSP and run the page on the server Userid: EGL4RPG Password: EGL4YOU // Nov 19, 2007 11:25:33 AM - EGL V7.0 Migration package jsfhandlers; import com.ibm.egl.jsf.UIViewRoot; handler TestSecurity type JSFHandler {onConstructionFunction = onPageLoad, view = "TestSecurity.jsp", viewRootVar = viewRoot, cancelOnPageTransition = YES} password string; //Logon Password username string; //Logon ID aS400 AS400Authentication; //ExternalType to a Java Class for authentication //Note that the Java Class is: AS400Authentication.java viewRoot UIViewRoot; //used for JSF Component Tree access Function onPageLoad() //syslib.setRemoteUser ("EGL4RPG", "EGL4YOU" ); //Login to the iSeries //iseriesd.dfw.ibm.com End function authenticate() rc int; //Return code for authentication call forwardLabel string; //Next page //assign the name of your host System i machine (ping-able) address aS400.setSystemName("iseriesd.dfw.ibm.com"); //Call the Java Class through the as400 ExternalType, passing UID/PWD rc = aS400.authenticate(username, password); if (rc == 0) //0 is a bad return code from the System i setError("Invalid User"); else forwardLabel = "NextPage"; forward to forwardLabel; //You are logged in end externalType AS400Authentication type JavaObject {JavaName = "AS400Authentication", PackageName = "as400Security"} static function setSystemName (systemName string in); static function authenticate (username string in, password string in) returns (int);