Gen Web application design - access to HTML header in Toolset model
search cancel

Gen Web application design - access to HTML header in Toolset model

book

Article ID: 218695

calendar_today

Updated On:

Products

Gen Gen - Workstation Toolset

Issue/Introduction

For a Gen Web application is it possible to write code in the Workstation Toolset model to access the HTML header to be able to find the id_token within the cookie or the header?

Resolution

The Action Diagram statements that can be coded in the Toolset are usually reserved for the application's business rules that apply regardless of the target platform of the application.  Since access to the HttpServletRequest and HttpServletResponse objects is specific to Java/Web applications, this access was only offered through EABs and some User Exits.

It has now been verified that these objects can also be accessed through Inline Code. Inline Code has many benefits over EABs, especially since the code is kept with the model. Also, it is encouraged that all new "external" logic to be done with Inline Code instead of EABs, where possible.

For further details and an example model see article Gen Example Model : INLINE CODE statement for Java.
The model contains examples covering how to modify the contents of a Repeating Group View (RGV) and how to access the HttpServletRequest object, execute methods on that object, and display the results of those methods.