60 likes | 69 Vues
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. EGL JSFHandler Function authenticate() Call to Java Class If successful forward to next page…. AS400Authenticate (Java Class)
E N D
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.
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 • 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
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
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
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
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