posted 19 years ago
I myself is replying first coz I have a solution but I don't know if its the best strategy.
We will have a properties file that has key as "ServletName_ForwardName" and servlet path as value. A class with a method like "loadControllerParams()" will load the properties in a static hashmap at startup with the help of a servlet that is loaded at container startup. We will define a static boolean value that will determine if the controller parameters should be loaded each and every time or only once at container startup.
Now the Servlets and JSPs just need to fetch the forward servlet name like
ControllerParamFile.hashMap.get("ServletName_Forward");
Please comment or suggest any better idea than this one,
Nitin Dubey