jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anil Agrawal" <a.agra...@popnet.co.in>
Subject RE: Servlet "init-param" elements not seen in test, apparently in ServletRedirector instead
Date Thu, 15 May 2003 08:30:53 GMT
Thanks Vincent for your prompt reply.

In my opinion Servlet "init-param" elements must 
Be picked up automatically from web.xml.

Why should I put my servlet's init parameters in to
Servlet redirectors "init-param"?

With regards
anil

-----Original Message-----
From: Vincent Massol [mailto:vmassol@pivolis.com] 
Sent: Thursday, May 15, 2003 1:48 PM
To: 'Cactus Users List'
Subject: RE: Servlet "init-param" elements not seen in test, apparently
in ServletRedirector instead




> -----Original Message-----
> From: Anil Agrawal [mailto:a.agrawal@popnet.co.in]
> Sent: 15 May 2003 10:05
> To: Cactus Users List
> Subject: RE: Servlet "init-param" elements not seen in test,
apparently in
> ServletRedirector instead
> 
> This is really bad solution to set all the inittparameters
> Of my servlet by  setInitParameter() in setup method?

Is it a question?

> 
> 1) This is extra load on my testServlet.

Load? What kind of load are you talking about? Put that in a common
setUp() method if you want to factorize the setup for different tests.

> 2) I will not able to test configuration of web.xml for init
parameters.

Yes, that's true. If you want to do that use the other solution I've
highlighted!

> 
> Pl. give us good solution for this problem.

You have 2 good solutions. Which one you wish to use depends on you...
 
-Vincent

> 
> With regards
> anil
> 
> 
> -----Original Message-----
> From: Vincent Massol [mailto:vmassol@pivolis.com]
> Sent: Sunday, May 04, 2003 11:04 PM
> To: 'Cactus Users List'
> Cc: 'Karr, David'
> Subject: RE: Servlet "init-param" elements not seen in test,
apparently
> in ServletRedirector instead
> 
> 
> Yep. Or you can define the init-parameters for the ServletRedirector 
> entry in web.xml. The setInitParameter() is probably better though.
> 
> -Vincent
> 
> > -----Original Message-----
> > From: eric.hodge@jpmorgan.com [mailto:eric.hodge@jpmorgan.com]
> > Sent: 01 May 2003 22:07
> > To: cactus-user@jakarta.apache.org
> > Cc: cactus-user@jakarta.apache.org
> > Subject: Re: Servlet "init-param" elements not seen in test,
> apparently in
> > ServletRedirector instead
> >
> >
> > In your ServletTestCase's setUp method, do this:
> >
> >   protected void setUp() throws Exception {
> >       config.setInitParameter("name", "value");
> >   }
> >
> >
> >
> >
> >
> >
> >
> > I have an app with a "web.xml" that specifies "init-param" elements
> for
> > specific servlets.  While running normally in Tomcat, this works
fine.
> 
> > When I test the app in Cactus, however, it doesn't appear to find
the
> > init params for the servlet.  I tried printing out all the init
params
> 
> > in the servlet, and by seeing what it printed out, it appears that
> while
> > executing my servlet, it is actually getting the init params for the

> > ServletRedirector servlet, instead of for my own servlet.  Is there
a
> > simple solution to this?
> >
> > I appear to be using Cactus 1.4.1.
> >
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: cactus-user-help@jakarta.apache.org
> >
> >
> >
> >
> >
> >
> > This communication is for informational purposes only.  It is not
> intended
> > as
> > an offer or solicitation for the purchase or sale of any financial 
> > instrument or as an official confirmation of any transaction. All 
> > market prices,
> data
> > and other information are not warranted as to completeness or
accuracy
> and
> > are subject to change without notice. Any comments or statements
made
> > herein do not necessarily reflect those of J.P. Morgan Chase & Co., 
> > its subsidiaries and affiliates.
> >
> >
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: cactus-user-help@jakarta.apache.org
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: cactus-user-help@jakarta.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: cactus-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: cactus-user-help@jakarta.apache.org


Mime
View raw message