Hi, There are 2 ways to set init params using Cactus:
1/ in the redirector as init parameter 2/ using setInitParameter() 2/ is certainly easier (and I would recommend it) but 1/ performs better real-life verification (as it's closer to what you'll have in production). Thanks -Vincent > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: 14 September 2003 22:41 > To: [EMAIL PROTECTED] > Subject: TestSampleServletConfig question > > Hey, I got a question on TestSampleServletConfig. > > I ran TestJettyAll in Eclipse and the arguments I used are: > -Dcactus.contextURL=http://localhost:8080/test - > Dcactus.jetty.config=C:\Downloads\software\jakarta-cactus-1.5-beta1- > src\samples\jetty\src\conf\jetty.xml - > Dcactus.jetty.resourceDir=C:\Downloads\software\jakarta-cactus-1.5-beta1 - > src\samples\jetty\src\webapp > > > The tests ran successfully. However, when I check the > TestSampleServletConfig class, it occurs to me that its config object is > set with the InitialParameters in jetty.xml, which are the initial > parameters of ServletTestRedirector. Is that the case? > > I added the following setUp() to the class: > > public void setUp(){ > config.setInitParameter("param1", "HAHA"); > } > > so that it will read the parameter of its own instead of that of the > ServletRedirector. I am just wondering if this should be a less confusing > way to test ServletConfig. Please correct me if I am wrong. Thanks. > > Qing > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
