"If" you are using servlet, then that file is read. The form servlets don't use the environment files as the forms server does. You need to put your CUSTOM TOP variable (where the form resides) path information into Apache/Jserv/etc/formservlet.ini file
Ref: Cannot open custom forms after configuring Forms Listener Servlets (Doc ID 269634.1)
Else, review the following blog posts;
https://ermanarslan.blogspot.com/2013/06/ebs-11i-add-custom-script.htmlhttps://ermanarslan.blogspot.com/2014/08/ebs-11i-function-not-available-to-this.html