I am completely new to cgi concepts.
I'm given a task to convert a Perl cgi script to Java program.
I understood that the require 'file.ext'
command in Perl includes the file available for code in the Perl script.
Because of the very limited resources and improper documentation I couldn't find any proper info.
Is there any Java equivalent to do the same action that require
in Perl does?
The paradigms do not map at all. In Perl, require simply reads a file and runs the code in it, and everything else happens as side effects of that. In Java, your code must be compiled, and classes are included automatically when you compile your program. See Extend a java class from one file in another java file for more answers on this topic.