Hi Denis,

Thanks for your feedback ! It seems however that there are a few points that
your managers have misunderstood ... :)
1/ There is a misunderstanding about web.xml. We're talking here about
deploying a _test_ war for testing not the real web.xml which will be
delivered for production .... So there is really no problem about messing up
with it
2/ It really depends what kind of test you want to achieve. If you're
looking at mock objects tests then yes you probably don't need messing with
web.xml ... However if you're looking at IC tests (in-container) then you
want to test using the _real_ container (i.e. everything including a
web.xml). If you don't use a web.xml file it means you will have to _mock_
the init. data !

Cheers,
-Vincent

----- Original Message -----
From: "Denis Krizanovic" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, July 22, 2001 1:43 AM
Subject: RE: [Cactus v2 - VOTE] Extension to web.xml mechanism


>
>
> I don't like messing with the web.xml, and neither do my managers. They
seem
> ok, just, about adding jspRedirector and servlet redirector, but polluting
> the web.xml file with even more stuff will freak them out.
>
> It's funny, they get the "are you sure? this doesn't feel right" look on
> their faces. Is there a way to externalise as much of this configuration
as
> possible? Maybe like the proprietary web-container configs, ie, Weblogic
has
> a web.xml and a weblogic.xml. the weblogic.xml file contains the additions
> to web.xml that are non-standard. Maybe cactus could have a cactus.xml
> sitting in WEB-INF, which is pointed to by web.xml somehow.
>
> ___
> dk-
>
>
> -----Original Message-----
> From: Vincent Massol [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, 22 July 2001 3:17 AM
> To: [EMAIL PROTECTED]
> Subject: [Cactus v2 - VOTE] Extension to web.xml mechanism
>
>
> In order to be able to define different init values for different test
> cases, we need to expand the current Cactus web.xml mapping mechanism.
> Currently, in web.xml we define a single servlet : the Redirector Servlet,
> as in :
>
>     <servlet>
>         <servlet-name>ServletRedirector</servlet-name>
>
>
<servlet-class>org.apache.commons.cactus.server.ServletTestRedirector</servl
> et-class>
>         <init-param>
>           <param-name>param1</param-name>
>           <param-value>value1 used for testing</param-value>
>         </init-param>
>     </servlet>
>
>
> This is not good enough, as I cannot have 2 test cases with 2 different
> "param1" values for example.
>
> * Proposition : several test mappings in web.xml
>
> I propose to write instead :
>
>     <servlet>
>         <!-- Default for all test cases when no testcase specific entry is
> defined -->
>         <servlet-name>ServletRedirector</servlet-name>
>
>
<servlet-class>org.apache.commons.cactus.server.ServletTestRedirector</servl
> et-class>
>     </servlet>
>
>     <servlet>
>         <servlet-name>ServletRedirector_XXX1</servlet-name>
>
>
<servlet-class>org.apache.commons.cactus.server.ServletTestRedirector</servl
> et-class>
>         <init-param>
>           <param-name>param1</param-name>
>           <param-value>value1</param-value>
>         </init-param>
>     </servlet>
>
>     [...]
>
>     <servlet>
>         <servlet-name>ServletRedirector_XXX2</servlet-name>
>
>
<servlet-class>org.apache.commons.cactus.server.ServletTestRedirector</servl
> et-class>
>         <init-param>
>           <param-name>param1</param-name>
>           <param-value>value2</param-value>
>         </init-param>
>     </servlet>
>
>
> The redirector URL defined in cactus.properties will be the prefix and
will
> get the testcase name prefixed to it. Cactus will have to scan the web.xml
> file so that if no mapping is done on the name ServletRedirector_XXX it
will
> then use the URL defined in cactus.properties as is (with no suffixing).
>
> I have no other simple ideas ...
>
> Thanks
> -Vincent
>

Reply via email to