Working with web transaction applications in EGL

Web transactions in EGL are a holdover from VisualAge® Generator, and offer a very basic web interface for user I/O. Best practice is to use web transactions for migration only. New code should use Rich UI for a web interface.

The central idea of web transactions is similar to the one behind Text UI:
  • A VGWebTransaction program (comparable to a Text UI program) presents a web page for user input.
  • The web page is based on a VGUIRecord (comparable to a Text UI form). EGL transforms fields in the record into controls on the web page, using field properties to determine the type of control to create.
When generating COBOL, EGL simply includes the VGUIRecord in the compiled program. When generating Java, EGL creates the following JSP files:
  • filename.jsp, for each VGUIRecord file, where filename.egl is the source file name.
  • EGLWebStartup.jsp, a web page that displays a list of your VGWebTransaction programs. You select a program and run it from this page rather than running the associated filename.jsp page.
  • CSOERRORUIR.jsp, the error page that you customize to report on TCP/IP communication problems and on problems internal to a web transaction.
  • Vagen1EntryPage.jsp, the default selection list for EGLWebStartup.jsp.
  • A series of sample files that show how to perform common tasks:
    • reqPage.jsp
    • usrMsgPage.jsp
    • Vagen1ErrorPage.jsp
    • Vagen1ExpiredPasswordPage.jsp
    • Vagen1LogonPage.jsp

You can customize these JSP files using Page Designer (see Using EGL with the Eclipse IDE).

To run web transactions in EGL, you must perform the following steps:
  1. Modify configuration files (see Web transaction configuration files).
  2. Get a web server running in your workspace.
  3. Customize Vagen1EntryPage.jsp to list your VGWebTransaction programs (see Running VGWebTransaction programs).
  4. Launch your programs through EGLWebStartup.jsp (see Running VGWebTransaction programs).

Customizing JSP files

EGL does not just allow you to modify the JSP files that it creates from your VGUIRecord files; it takes for granted that you will heavily modify these files. For this reason, EGL does not overwrite an existing name.jsf file (where name is name of your VGUIRecord). Instead, if name.jsf exists, EGL creates (or overwrites) a file named newname.jsf. You must copy the changed portions of the file to name.jsf yourself. Alternatively, if you want EGL to replace name.jsf, delete the file before generating.