Gen 8.6 Web application startup redirect to a "login" PStep
search cancel

Gen 8.6 Web application startup redirect to a "login" PStep

book

Article ID: 45194

calendar_today

Updated On:

Products

Gen Gen - Workstation Toolset

Issue/Introduction

In a Gen 8.6 Web Generation application if a user executes a URL for a "menu" Procedure Step e.g. menu.jsp, how can they be first redirected to a different "login" PStep to enter credentials e.g. login.jsp?

Resolution

The way to achieve this behaviour is to use CLEAR SCREEN INPUTS.
For Web Generation, an extra line needs to be added to the generated .jsp file before building the app i.e.
request.setAttribute("clearScreenInputs", "myValue");
That forces the "menu" PStep code to be executed before its window is displayed and the required logic can then be added to force a flow to the "login" PStep.
This section of the Gen 8.6 docs. has more details: Building and Running a Web Generation Application - see Run Web Generation

Additional Information

Attached are:
1. Example model with MENU and LOGIN Procedure Steps to demonstrate: clear1.ief.zip
2. A document that describes the design and testing steps after deploying to an Application Server: Gen_webapp_clear_screen_inputs_testing.docx

Attachments

clear1.ief.zip get_app
Gen_webapp_clear_screen_inputs_testing.docx get_app