We are using JSP/Servelt based web application running on Tomcat and I'm in the process of migration, struggled here.
In a servelet, 1 object being initialized that contains an pre initialized variable x = "abc".
The same class is been instantiated in more than 200 servlets.
Now the problem is the value of x has to be updated from the session.
I don't want to address all the files instead is it possible to get session in that class with out altering its methods and constructors.
I'm going to assume that putting the database type in the user's session was the right decision. Although that certainly isn't obvious from what you have posted so far. For all I know it might be better to put the database type in the application scope instead of session scope.
So then that DBType class would need to have access to the user's session. If it doesn't have that now, you would have to change the DBType class so that the servlet can pass it the session. And that would mean you would have to change every servlet which uses it.
But I would really prefer to answer your first question. The one where you were told why you had to change the system in the first place. Without knowing your actual requirements, we're just left discussing incompletely-described proposed solutions to a problem which we know nothing about. So anything you get as an answer won't be very useful.