tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Philipp von Hartrott" <p.hartr...@datadesignag.com>
Subject InitParameters missing in ServletConfig when Servlet-loading triggerd through RequestDispatcher
Date Thu, 16 May 2002 13:39:57 GMT
Hello,
using Tomcat 4.0.3 (and 4.0.2 also) I encounter the following problem:

Problem setup:
My servlet has no <load-on-startup/> set.

I start Tomcat.
I trigger the loading of servlet A through a RequestDispatchers forward as quoted below.
I trace my servlet A's ServletConfig init-parameters in the init() method call.
The newly loaded servlet A's ServletConfig DOES NOT contain the init-parameters I specifed
in web.xml!

Unsatisfying solution setup:
This time I specify a <load-on-startup>1</load-on-startup> in web.xml:

I start Tomcat.
The loading of servlet A is triggerd through the container on startup.
I trace my servlet A's ServletConfig init-parameters in the init() method call.
The newly loaded servlet A's ServletConfig as expected DOES contain all init-parameters I
specifed in web.xml.

Why are my init-parameters missing in the first case?

Thank you,
Philipp.


Code used for forwarding:
RequestDispatcher requestDispatcher = getServletContext().getRequestDispatcher("/servlet/"
+ responsibleServletName);
requestDispatcher.forward(servletRequest, servletResponse);

--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message