There has to be three or four programs that carry the basic infrastructure.
1- A library.java program which contains all the general structures and functions.
2- A program.java program which contains all the structures related with java programs or beans.
3- A global memory file or dir which contains all the DB acces related structures such as Hybernate definitions etc.
library.java has to be instantiated from the beginning of each JSP and it should be possible to be referred to with a simple function from each java program.
A reference to the global memory has to be created at the beginning of each java program.
It is important to design the system early so that the contents of these files are clear.
Set the identity of the current lib and program
Read the properties file
Set DB connection parameters
Set all the system variables based on properties values
Set encoding, datetime, user
Program management (invoke, thread processing, stack management)
Input handling(thread processing, STRUTS functions)
Screen and window (normal and modal) processing
STRUTS processing for returning input values from the screens
DB functions similar to Hybernate
Mainframe like workfile utilities
Error message processing
Original languages program calling/fetching utilities
Connection Pool management
Connections to External routines
Lib lock processing
Input control related to JSP management
Fields related management STRUTS mechanisms
Screen stack and BACK functions
WINDOW (position etc) management
General stack management
Edit masks management
Functions converted from the original language but does not exist in JAVA
Utility functions for programming
Utilities of the original system
Global memory file is an extension of the Library.java. It should inherit Library.java and add Hybernate definitions etc.