This week's giveaway is in the Cloud/Virtualization forum. We're giving away four copies of Secure Financial Transactions with Ansible, Terraform, and OpenSCAP and have Lucian Maly on-line! See this thread for details.
Hi, I am using a Control servlet with websphere test environment with vaj 3.5 with servlet 2.1 . I am having a problem with getting the init parms with the command - Enumeration enum = getInitParameterNames(); The enum comes out to be null. Looking at the console i noticed that the servlet invoker loads the servlet initialization parms when the wte environment is being setup and loads the Control servlet. I tried changing the default_app.webapp for the autostartto make it false so that the invoker doesn't run the init parameter but then it doesn't load the init parms at all as i see in the Console. <autostart> was set to true initially and then though the servlet init parms are loaded when the WTE starts up and shows up in the console, my program doesn't seem to pick up the init parms when i run my servlet even though it goes through the init(ServletConfig) method. I also have a super(Servletconfig) as the first statement to save the ServletConfig information.
I found the problem finally. It was with calling the servlet using /servlet/com.... instead of using just /ControlServlet (i used this finally and it worked)which is how i had defined it in the default_app.webapp. I am not sure but i think the invoker servlet actually calls a new copy of the servlet if it sees /servlet. But i am still confused - i use <autostart>false which is what i wanted. But why doesn't the invoker servlet do it the same way whether i use /servlet/com... or /ControlServlet. In the former case, it doesn't seem to get the getInitParameterNames() while in the latter case(/ControlServlet), it gets all the servlet Init parameter values. Beats me why-i thought both options could be used ?? Thanx, Vijay
Something about .... going for a swim. With this tiny ad ...
SKIP - a book about connecting industrious people with elderly land owners